[F8] removeMovieClip() in this script isn't working
I have absolutely no idea why the following code isn't working. I've checked the documentation for removeMovieClip at least a dozen times. The only thing I've noticed is the following:
Quote:
Method; removes a movie clip instance created with duplicateMovieClip(), MovieClip.duplicateMovieClip(), or MovieClip.attachMovie().
As you will notice, I'm using createEmptyMovieClip() - not one of the methods mentioned - but I swear I've used removeMovieClip to delete movieclips created this way before and it's worked fine. I can't find an alternative command, either.
Here is my code. When I trace white in the onRollOut function, it returns the correct path, so it's not a targetting issue. I've also tried adjusting one of the movieclip white's properties (alpha) and it's worked fine.
Code:
planet.onRollOver = function(){
var over:MovieClip = createEmptyMovieClip("white",this.getDepth()-1);
//other events
}
planet.onRollOut = function(){
white.removeMovieClip(); //trace here returns proper path
}
Any ideas as to why this command isn't working would be great.