
unloadMovie() Global Function
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
909
Example
var msg = "hello!";
// Set msgCoded to "hello%21"
msgCoded = escape(msg);
// Set msgDecoded to "hello!"
var msgDecoded = unescape(msgCoded);
See Also
escape(); Appendix B
unloadMovie() Global Function
unload a movie or movie clip from the Player
Flash 4
unloadMovie(target)
Arguments
target A string or reference indicating the path to the movie clip or document level
to unload from the Player (references are converted to paths when used in a
string context).
Description
The unloadMovie() function is used most often to unload movies from document levels in
the Player. For example, if a movie is loaded onto level 1 in the Player, we can unload that
movie from the Player as follows:
unloadMovie("_level1");
The unloadMovie() function can also be used to unload 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 can load subsequent .swf or .jpg files into that shell. Hence, a
single clip can act as a container for dynamic content that is managed through successive
loadMovie() and unloadMovie() executions. Note that unloadMovie() differs from
removeMovieClip() insofar as the latter removes a clip instance from memory, whereas