Actionscript 3 Answers: targeting
Actionscript 3 Answers: targeting
- Started
- Last post
- 3 Responses
- Pupsipu0
yea it's either that or getChildByName() and getChildByIndex(). It's also in that kirupa AS3 Tips thread if you start reading it from the beginning. And congratulations.
- airey0
thanks mate!
- NONEIS0
OK, so here's the thing. You need to wait for your classes to initialize before trying to use MovieClips that are on your stage.
In your constructor for the document class, add an event listener for ADDED_TO_STAGE, make that call a function that does your set up code. No need for an array unless you really want one, you can simply use the instance names if you wait for that event to fire, or store them into private vars which is far better.