
loadMovie() Global Function
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
569
current timeline instead of the new, undefined level. For example, when executed from the
main timeline of
_level0, the following will replace the movie in _level0 if _level1 has not
yet been defined:
loadMovie("myMovie.swf", _level1);
The following is a safer approach if you can’t guarantee that the level already exists:
loadMovie("myMovie.swf", "_level1"); // Works even if _level1 doesn't exist
However, the existence of _level0 is always guaranteed, so we can always refer to it using
_level0 without quotes, as in:
startDrag(_level0, true);
See Also
_global, loadMovie( ), _root, unloadMovie( ); “Importing External Movies,” and “Movie
and Instance Stacking Order,” in Chapter 13
loadMovie() Global Function
load an external .swf or .jpg file into the Player
Flash 4; Flash 6 adds .jpg loading and security restrictions
loadMovie(url, target)
loadMovie(url, target, method)
Arguments
url A string specifying the absolute or relative file path of the external .swf movie
or .jpg image file to load. All URLs must use forward slashes, and absolute
URLs must include the protocol reference (e.g., http:// or file:///). Relative URLs
are resolved relative to the URL of the movie on
_level0 (i.e., _level0._url)
and use the http:// protocol by default. ...