I'm trying to make dynamic buttons that I can create through code and change the text on them. Right now I just have a graphic with a dynamic text field on it, but i can't access the text field through the action script. Any suggestions? Thanks.
Sadly there is not really code to post. What I have is a button created named button_1 (or something generic like that) and within it a dynamic text field named text_1.
I've just been trying to do something like
text_1.text = "some text"; but it can't seem to find it within the button. I just found out I should be getting flash professional any day here to develop on and I was thinking I could just make a custom component that will handle all of this. I will have to create, and set text on these buttons dynamically, so am I right in thinking a custom component will handle this for me? Thanks
You can't access text properties within buttons in the same way as you can within movieclips - best thing to do is to use a movieclip as your button by adding an onRelease event to it. You'll then be able to change the textfield properties etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.