Guest User

Untitled

a guest
Jun 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. package coa.application{
  2. import flash.display.SimpleButton;
  3. import flash.text.TextField;
  4. import flash.text.TextFieldType;
  5.  
  6. public class Tab extends SimpleButton {
  7.  
  8. public var menuType:String;
  9.  
  10. public function Tab(tabText:String, menuType:String) {
  11. this.menuType=menuType;
  12. var mytext:TextField=createTextField(0,0,200,20);
  13. mytext.text=tabText;
  14. }
  15. private function createTextField(x:Number, y:Number, width:Number, height:Number):TextField {
  16. var result:TextField = new TextField();
  17. result.x=x;
  18. result.y=y;
  19. result.width=width;
  20. result.height=height;
  21. addChild(result);
  22. return result;
  23. }
  24. }
  25. }
  26.  
  27. //addChild(result);
  28. upState = result;
  29.  
  30. upState = new Sprite();
  31. upState.addChild(new MyButtonBackground()); //Make this class.
  32. upState.addChild(result);
Add Comment
Please, Sign In to add comment