I’m doing a project using ActionScript 2 where I’m loading in text from an XML file to dynamic text boxes. I’m loading everything in on the first frame, but there are boxes that do not exist in the timeline until frame 5 or so. Is there anyway I can access those to set their text property from the first frame?? Thanks!
Share
Quick and dirty answer:
If you know exactly which frame the text boxes appear on, you can use this procedure to populate their text as soon as they’re available:
1. Set their visibility to false in Flash
2. In an action keyframe on the same frame number when the text field appears, apply the value to the newly instanced text field
3. In the same action keyframe, set their visibility to true. This will avoid flicker as text will already be populated when they become visible.
If you were using AS3, I’d suggest the OOP answer instead:
In our dev team we use the latter approach all the time. Works like a charm.