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,
_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 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.
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...