Problems with Flash 8 (AS2), Timelines, and Variable Scopes

83 views Asked by At

Okay, so trying to not post 5 pages of information, I'll start with the following:

In a movie clip, I have 3 keyframes. I'm trying to edit a textbox on each frame, but I've found previously that only the text box in the current frame is accessible. In an attempt to work with that idea, I've tried going:

clip.gotoAndStop(1);
clip.text1.text = blah;
clip.gotoAndStop(2);
clip.text2.text = blah2;
clip.gotoAndStop(3);
clip.text3.text = blah3;
clip.gotoAndStop(1);

Through trace statements, I can see that the texts are changing, but once I go back to frame 1, the text is back to what I have the default set as. This kind of thing is happening in various ways across my project, and I really just don't know what to make of it. Any ideas?

1

There are 1 answers

0
BadFeelingAboutThis On BEST ANSWER

The issue is likely that your Text fields are being unloaded (eg There are frame where they are not on the stage anymore), so when frame 1 comes around, it re creates them (which gives them the text that you put in on the keyframe).

To work around this, In AS2, you can set a variable for the text field. Put a unique value in for each text box, and it should resolve your issue.

Enter a unique variable name for each text field