Hello
Heres the code I have inside a class in a constructor:
Code:
var bgRed:Shape = new Shape()
bgRed.graphics.beginFill( 0xFF0000 );
bgRed.graphics.drawRect( 0, 0, 200, 30 );
bgRed.graphics.endFill();
var bgBlack:Sprite = new Sprite();
bgBlack.graphics.beginFill( 0x000000 );
bgBlack.graphics.drawRect( 0, 0, 200, 30 );
bgBlack.graphics.endFill();
var tf:TextFormat = new TextFormat();
tf.color = 0xFFFFFF;
tf.font = "Verdana";
tf.size = 17;
tf.align = "center";
var txt:TextField = new TextField();
txt.text = "Snipplr Rocks!";
txt.x = 0;
txt.y = 0;
txt.width = bgRed.width;
txt.height = bgRed.height;
txt.setTextFormat( tf );
var mc:MovieClip = new MovieClip();
mc.addChild( bgRed );
mc.addChild( txt );
var mc2:MovieClip = new MovieClip();
mc2.addChild( bgBlack );
mc2.addChild( txt );
var btn:SimpleButton = new SimpleButton();
btn.upState = mc;
btn.overState = mc2;
btn.downState = btn.upState;
btn.hitTestState = btn.upState;
btn.x = 10;
btn.y = 10;
addChild( btn );
What it will only show text on mouse-over effect?
Thanks a lot for help!