How can I expect flash (as2) to load children before running some code?

I have seven buttons on the stage. I want to add events to these buttons, however most of them are "undefined" / null. How to wait for a stage or _root in as2 to finish loading the children before doing anything.

Is there an equivalent to flex 3 applicationComplete? <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="init()">

+4
source share
1 answer

To make sure your movie clip is created with all children, you must use the onLoaded handler. http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118cd9b5f6e-7868.html

It is strange that you experience such a problem if you put the code in a frame.

+1
source

All Articles