Create an object when a certain movieclip is on stage

Hello all,

Currently, I have a few movieclips on stage. These movieclips are animated, and will show up on stage depending on the animation. For example, one could show up starting on frame 5, and the next coudl show up starting on frame 8.

These movieclips will be passed into my classes when I create a new object. As I am putting all of my code in a document class, the code will get executed once the movie finishes loading. In this case, any objects created that are passed the movieclips which are not yet on stage will toss a nasty error.

I am thinking about using ADDED_TO_STAGE to listen when these objects are on stage, and then create the objects.

In that case, how would i be able to listen for that event? Would i have to attach the listener to the movieclip i m listening for?

Cheers :smiley: