Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package coa.application{
- import flash.display.SimpleButton;
- import flash.text.TextField;
- import flash.text.TextFieldType;
- public class Tab extends SimpleButton {
- public var menuType:String;
- public function Tab(tabText:String, menuType:String) {
- this.menuType=menuType;
- var mytext:TextField=createTextField(0,0,200,20);
- mytext.text=tabText;
- }
- private function createTextField(x:Number, y:Number, width:Number, height:Number):TextField {
- var result:TextField = new TextField();
- result.x=x;
- result.y=y;
- result.width=width;
- result.height=height;
- addChild(result);
- return result;
- }
- }
- }
- //addChild(result);
- upState = result;
- upState = new Sprite();
- upState.addChild(new MyButtonBackground()); //Make this class.
- upState.addChild(result);
Add Comment
Please, Sign In to add comment