So I’ve been in a test class for Flash Lite 2.1, and I learned something (imagine that). Actually it isn’t related to Flash Lite directly. What I learned was why removeMovieClip() doesn’t seem to work all the time.
When you create a MovieClip with the visual tools in the Flash IDE, the IDE assigns that MovieClip a negative depth. If you try to call removeMovieClip() on a MovieClip with a negative depth, it just won’t work.
There are a couple of ways around this:
- Change the depth of the MovieClip to a positive number, and then call removeMovieClip().
- Use unloadMovie() instead of removeMovieClip()
Ah, the answer to a long standing question.