unloadMovieNum( ) Global Function

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
unloadMovieNum( ) Global Function Flash 3

remove a movie from a document level
unloadMovieNum(level)

Arguments

level

A nonnegative integer or an expression that yields a nonnegative integer, indicating the document level to unload.

Description

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);

Usage

The unloadMovieNum( ) function corresponds to the Unload Movie action in Flash 3 and Flash 4, which worked only with numbered levels.

See Also

loadMovieNum( ), MovieClip.removeMovieClip( ), MovieClip.unloadMovie( ), removeMovieClip( ), unloadMovie( ); "Removing Clip Instances and Main Movies," in Chapter 13



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net