Guest User

Untitled

a guest
Jun 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. package com.fileupload
  2. {
  3. import flash.display.*;
  4. import flash.text.*;
  5.  
  6. /**
  7. * ...
  8. * @author Jonathan Torres
  9. */
  10. public class UploadButton extends Sprite
  11. {
  12. private var uploadButton:Sprite;
  13. private var uploadText:TextField;
  14.  
  15. public function UploadButton()
  16. {
  17. this.buttonMode = true;
  18. this.x = 0;
  19. this.y = 0;
  20.  
  21. var uploadTextFormat:TextFormat = new TextFormat();
  22. uploadTextFormat.align = TextFormatAlign.CENTER;
  23. uploadTextFormat.font = 'Arial';
  24. uploadTextFormat.color = 0xFFFFFF;
  25. uploadTextFormat.size = 12;
  26.  
  27. uploadText = new TextField();
  28. uploadText.defaultTextFormat = uploadTextFormat;
  29. uploadText.text = 'Upload';
  30. uploadText.width = 50;
  31. uploadText.height = 20;
  32. uploadText.selectable = false;
  33.  
  34. uploadButton = new Sprite();
  35. uploadButton.graphics.beginFill(0x990000, 1.0);
  36. uploadButton.graphics.drawRect(0, 0, 50, 20);
  37. uploadButton.graphics.endFill();
  38.  
  39. uploadButton.addChild(uploadText);
  40. addChild(uploadButton);
  41. }
  42.  
  43. }
  44.  
  45. }
Add Comment
Please, Sign In to add comment