Dynamic Text Controlled with button
HELP!!
Using Flash MX 2004, Pro.
I have a button on the main timeline.
on (rollOver) the button creates a dynamic text box.
How do I remove the text box when the user does rollOut?
Thanks in advance,
Christine
On the main timeline, frame 1:
//create text formatting for dynamic text headline
var txt_fmtA:TextFormat = new TextFormat();
txt_fmtA.font = "Arial";
txt_fmtA.bold = true;
txt_fmtA.size = 11;
txt_fmtA.leftMargin = 3;
txt_fmtA.rightMargin = 3;
txt_fmtA.color = 0xFFFFFF;
//create text formatting for dynamic body text
var txt_fmt:TextFormat = new TextFormat();
txt_fmt.font = "Arial";
txt_fmt.size = 9;
txt_fmt.leftMargin = 3;
txt_fmt.rightMargin = 3;
txt_fmt.leading = 2;
On the Button:
on (rollOver) {
//Headline Box
this.createTextField("hdrWA", 11, 104, 13, 150, 23);
hdrWA.setNewTextFormat(txt_fmtA);
hdrWA.multiline = false;
hdrWA.wordWrap = true;
hdrWA.autoSize = false;
hdrWA.background = true;
hdrWA.border = false;
hdrWA.backgroundColor = 0x334C8F;
hdrWA.text = "Headline";
//Body Text Box
this.createTextField("WA", 10, 104, 36, 150, 50);
WA.setNewTextFormat(txt_fmt);
WA.multiline = true;
WA.wordWrap = true;
WA.autoSize = true;
WA.background = true;
WA.border = false;
WA.backgroundColor = 0xECEDE7;
WA.text = "This is a test. This is only a test.";
}
//this part doesn't work Please Help?
on (rollOut, release, releaseOutside) {
this.removeTextField("hdrWA", 11, 104, 13, 150, 23);
}