Global Functions
59
Normally, Flash Player displays a single SWF file and then closes. The
loadMovieNum()
action lets you display several SWF files at once and switch among SWF files without loading
another HTML document.
If you want to specify a target instead of a level, use
loadMovie()
instead of
loadMovieNum()
.
Flash Player has a stacking order of levels starting with level 0. These levels are like layers of
acetate; they are transparent except for the objects on each level. When you use
loadMovieNum()
, you must specify a level in Flash Player into which the SWF file will load.
When a SWF file is loaded into a level, you can use the syntax,
_level
N
, where
N
is the level
number, to target the SWF file.
When you load a SWF file, you can specify any level number and you can load SWF files into
a level that already has a SWF file loaded into it. If you do, the new SWF file will replace the
existing SWF file. If you load a SWF file into level 0, every level in Flash Player is unloaded,
and level 0 is replaced with the new file. The SWF file in level 0 sets the frame rate,
background color, and frame size for all other loaded SWF files.
The
loadMovieNum()
action also lets you load JPEG files into a SWF file while it plays. For
images and SWF files, the upper left corner of the image aligns with the upper left corner of
the Stage when the file loads. Also in both cases, the loaded file inherits rotation and scaling,
and the original content is overwritten in the specified level.
Note
: JPEG files saved in progressive format are not supported.
Use
unloadMovieNum()
to remove SWF files or images that were loaded with
loadMovieNum()
.
Availability:
ActionScript 1.0; Flash Lite 1.1 - Flash 4 files opened in Flash 5 or later are
converted to use the correct syntax. Loading JPEG files requires Flash Player 6 or later.
Parameters
url
:
String
- The absolute or relative URL of the SWF or JPEG file to be loaded. A relative
path must be relative to the SWF file at level 0. For use in the stand-alone Flash Player or for
testing in test mode in the Flash authoring application, all SWF files must be stored in the
same folder and the filenames cannot include folder or disk drive specifications.
level
:
Number
- An integer specifying the level in Flash Player into which the SWF file will
load.
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...