420
Chapter 12: ActionScript Dictionary
loadMovie()
Availability
Flash Player 3.
Usage
loadMovie("
url
",
target
[,
method
])
Parameters
url
The absolute or relative URL of the SWF file or JPEG file to be loaded. A relative path
must be relative to the SWF file at level 0. Absolute URLs must include the protocol reference,
such as http:// or file:///.
target
A path to a target movie clip. The target movie clip will be replaced by the loaded SWF
file or image.
method
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.
Description
Function; loads a SWF or JPEG file into Flash Player while the original SWF file is playing.
Tip:
If you want to monitor the progress of the download, use
MovieClipLoader.loadClip()
instead of
this function.
The
loadMovie()
function lets you display several SWF files at once and switch between SWF
files without loading another HTML document. Without the
loadMovie()
function, Flash
Player displays a single SWF file and then closes.
If you want to load a SWF or JPEG file into a specific level, use
loadMovieNum()
instead of
loadMovie()
.
When a SWF file is loaded into a target movie clip, you can use the target path of that movie clip
to target the loaded SWF file. A SWF file or image loaded into a target inherits the position,
rotation, and scale properties of the targeted movie clip. The upper left corner of the loaded image
or SWF file aligns with the registration point of the targeted movie clip. Alternatively, if the target
is the
_root
Timeline, the upper left corner of the image or SWF file aligns with the upper left
corner of the Stage.
Use
unloadMovie()
to remove SWF files that were loaded with
loadMovie()
.
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...