unloadMovieNum( ) Global Function | Flash 3 |
remove a movie from a document level |
A nonnegative integer or an expression that yields a nonnegative integer, indicating the document level to unload.
The unloadMovieNum( ) function is nearly identical to unloadMovie( ), except that it requires the target level of the load operation to be specified as a number rather than as a string. This means that unloadMovieNum( ) can remove movies from document levels only, not from movie clips. Normally, it is used when we wish to dynamically assign the level of a movie to unload, as in:
var x = 3; unloadMovieNum(x);
This can also be achieved using string concatenation with the regular unloadMovie( ) function:
unloadMovie("_level" + x);
The unloadMovieNum( ) function corresponds to the Unload Movie action in Flash 3 and Flash 4, which worked only with numbered levels.
loadMovieNum( ), MovieClip.removeMovieClip( ), MovieClip.unloadMovie( ), removeMovieClip( ), unloadMovie( ); "Removing Clip Instances and Main Movies," in Chapter 13