Adding button with dynamic text fields
Hi all
I haven’t used flash for a while so I’m a bit rusty.
I’m simple trying to add a Button with a dynamic text field and a over state to the button that changes the color of the text.
I want to create a list of nav links and then have an over state on the links.
I tried this, but I’m getting lost.
I have a button in the library with an over state and a text field. The button is exported for Actionscript.
package{
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Doc extends MovieClip{
private var btn:SimpleButton = new But()
private var txt:TextField = new TextField()
public function Doc(){
txt.text = "New text";
txt.x = 0;
txt.y = 0;
addChild(btn);
btn.addChild(txt);
btn.x=btn.y=100;
}
}
}