Hi
I would like to know if there is a method, a property or a function to know if a movieclip is on the scene of my flash file.
Here is the thing: I would like to use the removeChild function on some movieclips but only when they are actually on the scene so that I don’t get error messages.
Does something like this exist:
if(my_movie_clip.is_on_the_scene){
removeChild(my_movie_clip);
}
The only solution I found would be to deal with a addEventListener(Event.ADDED_TO_STAGE, my_function) to check a variable that would equal 1 if the clip was added on the scene and that would equal 0 if the clip was removed from the scene… but I’m searching for something more simple.
thanks for your help