How can I modify objects inside frames with AS3 in a permanent way?

Posted by curro on Stack Overflow See other posts from Stack Overflow or by curro
Published on 2010-04-18T18:59:35Z Indexed on 2010/04/18 19:23 UTC
Read the original article Hit count: 322

Filed under:
|
|
|
|

I have a MovieClip symbol created with flash in a fla file library. There is a textfield in frame one of this movieclip's timeline . There is another frame in the movieclip timeline. There is a custon class definition for this symbol. It is a flipping card in a memory game.

I access the textfield by going to frame 2 (gotoAndStop(2)) and setting the textfield's text property ( this.field.text = "hello" ). However if I go to frame 1 and then return to frame 2, the text becomes the original one in the library's symbol. I have to modify the text propery again in a showFace method I've written.

Besides, I cannot pass parameters in the constructor because it is a symbol in the library and that would give errors.

I find this behaviour of flash extremely weird.

Is there a way I can set properties inside frames permanently?

Thank you

© Stack Overflow or respective owner

Related posts about flash

Related posts about as3