This content has been marked as final. Show 3 replies
only movieclips that have depths between 0 and 1,048,575 are removable. so, use swapDepths() to place your movieclip at one of those depths and then execute your removeMovieClip() statement.
Cancelled -- Sorry
I don't think who ever taught you taught you quite right. Removing clips is a good idea, but in this case it isn't the most important part.
First and foremost you should stop the onEnterFrame, that is going to be the biggest useless (once the clip is faded) waste of resources. Here is what I would put inside that if statement at the end.
Since the alpha could be some crazy negative number setting it to zero is a good idea incase you need to fade it up later or some such.
Setting the visibility to false will make sure that any rollovers, etc defined for that clip won't work.
And finally deleting the onEnterFrame will save on resources.
If a movie is hidden away and not referenced again Flash will automatically minimize its impact on the processor.
As for removeMovieClip(). You should start with the help files on it. If you check there you will see that it can only remove dynamically instanced clips – e.g. those created with duplicateMovieClip, attachMovie, and createEmptyMovieClip. I think it is possible to use with a authoring environment placed clip if you first swapDepths() to a positive value depth – maybe, but not necessary.