home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import flash.display.MovieClip;
- import flash.display.Sprite;
- import flash.text.TextField;
-
- public class TextButton extends Sprite
- {
-
- public static var LONG:Class = TextButton_LONG;
-
- public static var SQUARE:Class = TextButton_SQUARE;
-
-
- private var button:MovieClip;
-
- private var label:TextField;
-
- public function TextButton(param1:Class, param2:String = "")
- {
- super();
- button = new param1() as MovieClip;
- button.stop();
- button.buttonMode = true;
- label = button.label;
- if(label)
- {
- label.mouseEnabled = false;
- }
- addChild(button);
- this.text = param2;
- }
-
- public function set text(param1:String) : void
- {
- label.text = param1;
- }
-
- public function get text() : String
- {
- return label.text;
- }
- }
- }
-