vendredi 3 mars 2017

AS3: Changing a TextField in a MovieClip

I want to make a button with a TextField on it, a label if you'd like, that is changeable with AS3.

I've realised that I can not do this with a SimpleButton, but through using the MovieClip's timeline and navigating that back and forth, I've managed to change the button's texture when it is hovered over and clicked. I did make three TextFields on top of the button in each frame of the timeline, but I can't find a way to change the TextField(s) permanently.

btn is the MovieClip, l1 is the TextField for frame 1.

btn.l1.text = "label"

works until I touch the button (which changes the MovieClip's frame on the timeline), and when it returns to frame 1, its label is back to nothing.

What I essentially need to know is; how do I permanently change a TextField in a MovieClip which is changing frames?

Aucun commentaire:

Enregistrer un commentaire