loadMovieNum()
421
Example
The following
loadMovie()
statement is attached to a navigation button labeled Products. There
is an invisible movie clip on the Stage with the instance name
dropZone
. The
loadMovie()
function uses this movie clip as the target parameter to load the products in the SWF file into the
correct position on the Stage.
on(release) {
loadMovie("products.swf",_root.dropZone);
}
The following example loads a JPEG image from the same directory as the SWF file that calls the
loadMovie()
function:
loadMovie("image45.jpeg", "ourMovieClip");
See also
_level
,
loadMovieNum()
,
MovieClipLoader.loadClip()
,
unloadMovie()
loadMovieNum()
Availability
Flash Player 4. Flash 4 files opened in Flash 5 or later are converted to use the correct syntax.
Usage
loadMovieNum("
url
",
level
[,
variables
])
Parameters
url
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-movie 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
An integer specifying the level in Flash Player into which the SWF file will be loaded.
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.
Description
Function; loads a SWF or JPEG file into a level in Flash Player while the originally loaded SWF
file is playing.
Tip:
If you want to monitor the progress of the download, use
MovieClipLoader.loadClip()
instead of
this function.
Normally, Flash Player displays a single SWF file and then closes. The
loadMovieNum()
action
lets you display several SWF files at once and switch between SWF files without loading another
HTML document.
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...