Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import flash.events.MouseEvent;
- import flash.display.Shape;
- submitBtn.addEventListener(MouseEvent.CLICK, makeBubble);
- function makeBubble (event:MouseEvent):void
- {
- chatBubble.y-= 20;
- bubble.y-= 20;
- var username:String;
- username = "Joe";
- var chatText:String;
- var bubble:TextField = new TextField();
- bubble.x = 170;
- bubble.y = 80;
- var chatBubble:MovieClip = new MovieClip;
- chatBubble.graphics.beginFill(0xFFFFFF);
- chatBubble.graphics.drawRect(0,0,200,20);
- chatBubble.graphics.endFill();
- chatBubble.x = 170;
- chatBubble.y = 80;
- bubble.text = (username + ": " + chatText);
- chatText = textBox.text;
- addChild(chatBubble);
- addChild(bubble);
- }
Add Comment
Please, Sign In to add comment