yarekGmail
asked on
flash simple button with text
Hello experts,
I have a simple Button in Flash cs5 - as3 called btn1 with a dynamic text called text_txt inside inside it.
The goal is simply to change the text BUT..
btn1.visible=true; // works fine
this.btn1.text_txt.text="h ello"; // give a NULL error
My question is: how to programatically change the text that is inside that button ?
I have a simple Button in Flash cs5 - as3 called btn1 with a dynamic text called text_txt inside inside it.
The goal is simply to change the text BUT..
btn1.visible=true; // works fine
this.btn1.text_txt.text="h
My question is: how to programatically change the text that is inside that button ?
btn1.label = "hello";
ASKER
I have this issue not with a button component but a button movieclip.
Create a rectangle. Press F8 and coose button
Edit thr buuton and add a text.
Regards
Create a rectangle. Press F8 and coose button
Edit thr buuton and add a text.
Regards
Unless I'm wrong on this, I don't believe chlidren of a "SimpleButton" object are dynamically accessible. Instead you should make it a MovieClip symbol, and manually create all of the rollOver/rollOut behaviors with Actionscript.
Putting a dynamic TextField inside of a MovieClip IS accessible, so I would recommend doing it that way.
Putting a dynamic TextField inside of a MovieClip IS accessible, so I would recommend doing it that way.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just curious why you accepted the answer from blue-genie when he was just agreeing with what I put first... Shouldn't I at least get some points for this?