Guest User

Untitled

a guest
Oct 19th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import flash.events.MouseEvent;
  2. import flash.display.Shape;
  3. submitBtn.addEventListener(MouseEvent.CLICK, makeBubble);
  4. function makeBubble (event:MouseEvent):void
  5. {
  6.     chatBubble.y-= 20;
  7.     bubble.y-= 20;
  8. var username:String;
  9.     username = "Joe";
  10. var chatText:String;
  11.    
  12. var bubble:TextField = new TextField();
  13.    
  14.     bubble.x = 170;
  15.     bubble.y = 80;
  16. var chatBubble:MovieClip = new MovieClip;
  17.     chatBubble.graphics.beginFill(0xFFFFFF);
  18.     chatBubble.graphics.drawRect(0,0,200,20);
  19.     chatBubble.graphics.endFill();
  20.     chatBubble.x = 170;
  21.     chatBubble.y = 80;
  22.     bubble.text = (username + ": " + chatText);
  23.     chatText = textBox.text;
  24.     addChild(chatBubble);
  25.     addChild(bubble);
  26. }
Add Comment
Please, Sign In to add comment