EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 422

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
422 Chapter 12: ActionScript Dictionary
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,
_levelN, 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 allows you to load JPEG files into a SWF file while it plays. For
both 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.
Use
unloadMovieNum() to remove SWF files or images that were loaded with loadMovieNum().
Example
This example loads the JPEG image image45.jpg into level 2 of Flash Player.
loadMovieNum("http://www.blag.com/image45.jpg", 2);
See also
loadMovie()
, unloadMovieNum(), _level
loadVariables()
Availability
Flash Player 4; behavior changed in Flash Player 7.
Usage
loadVariables ("url" , target [, variables])
Parameters
url
An absolute or relative URL where the variables are located. If the SWF file issuing this call
is running in a web browser,
url must be in the same domain as the SWF file; for details, see
“Description,” below.
target The target path to a movie clip that receives the loaded variables.
variables An optional parameter specifying an HTTP method for sending variables. The
parameter must be the string
GET or POST. If there are no variables to be sent, omit this parameter.
The GET method appends the variables to the end of the URL and is used for small numbers of
variables. The
POST method sends the variables in a separate HTTP header and is used for long
strings of variables.
Returns
Nothing.

Table of Contents

Related product manuals