Name
unloadMovie( ) Global Function — remove a movie or movie clip from the Player
Availability
Flash 4 and later (Flash 5’s unloadMovie(
)
function corresponds to Flash 4’s Unload
Movie
with a target path)
Synopsis
unloadMovie(target)
Arguments
- target
A string or reference indicating the path to the movie clip or document level to remove from the Player (references are converted to paths when used in a string context).
Description
The unloadMovie( )
function is most often used
to delete movies from document levels in the Player. For example, if
a movie is loaded onto level 1 in the Player, we may remove that
movie from the Player as follows:
unloadMovie("_level1");
The unloadMovie( )
function can also be used on
movie clip instances, in which case it removes the content of the
instance but not the instance itself. The instance is left on stage
as an empty shell; we may load subsequent movies into that shell.
Hence, a single clip can act as a container for dynamic content that
is managed through successive loadMovie( )
and
unloadMovie( )
executions.
See Also
loadMovie( )
, MovieClip.unloadMovie(
)
, unloadMovieNum( )
; Section 13.6 and Section 13.8.3.1
in Chapter 13
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.