
604
Chapter 2: ActionScript Language Reference
MovieClipLoader.loadClip()
Availability
Flash Player 7.
Usage
my_mcl
.loadClip(
url:String
,
target:Object
)
: Boolean
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:///. Filenames cannot include disk drive specifications.
target
The target path of a movie clip, or an integer specifying the level in Flash Player into
which the movie will be loaded. The target movie clip is replaced by the loaded SWF file
or image.
Returns
A Boolean value. The return value is
true
if the URL request was sent successfully; otherwise the
return value is
false
.
Description
Method; loads a SWF or JPEG file into a movie clip in Flash Player while the original movie is
playing. Using this method lets you display several SWF files at once and switch between SWF
files without loading another HTML document.
Using this method instead of
loadMovie()
or
MovieClip.loadMovie()
has a number of
advantages. The following handlers are implemented by the use on a listener object, which is
registered with the MovieClipLoader class using
MovieClipLoader
.addListener(
listenerObject
)
.
•
The
MovieClipLoader.onLoadStart
handler is invoked when loading begins.
•
The
MovieClipLoader.onLoadError
handler is invoked if the clip cannot be loaded.
•
The
MovieClipLoader.onLoadProgress
handler is invoked as the loading process progresses.
•
The
MovieClipLoader.onLoadInit
handler is invoked after the actions in the first frame of the
clip have executed, so you can begin manipulating the loaded clip.
•
The
MovieClipLoader.onLoadComplete
handler is invoked when a file has completed
downloading.
A SWF file or image loaded into a movie clip inherits the position, rotation, and scale properties
of the movie clip. You can use the target path of the movie clip to target the loaded movie.
You can use the
loadClip()
method to load one or more files into a single movie clip or level;
MovieClipLoader listener objects are passed the loading target movie clip instance as a parameter.
Alternately, you can create a different MovieClipLoader object for each file you load.
Use
MovieClipLoader.unloadClip()
to remove movies or images loaded with this method or
to cancel a load operation that is in progress.
Summary of Contents for FLASH MX 2004-ACTIONSCRIPT LANGUAGE
Page 1: ...ActionScript Language Reference...
Page 20: ...20 Contents...
Page 24: ...24 Chapter 1 Introduction...
Page 145: ...Button onKeyDown 145 See also Button onKeyUp...
Page 186: ...186 Chapter 2 ActionScript Language Reference See also Camera onActivity Camera setMotionLevel...
Page 202: ...202 Chapter 2 ActionScript Language Reference See also break default strict equality switch...
Page 282: ...282 Chapter 2 ActionScript Language Reference See also break continue while...
Page 383: ...LoadVars addRequestHeader 383 See also XML addRequestHeader...
Page 388: ...388 Chapter 2 my_lv load place a valid URL pointing to a text file here...
Page 463: ...Microphone setRate 463 See also Microphone rate...
Page 469: ...Microphone silenceLevel 469 See also Microphone gain Microphone setSilenceLevel...
Page 480: ...480 Chapter 2 ActionScript Language Reference See also Mouse addListener...
Page 529: ...MovieClip globalToLocal 529 See also MovieClip getBounds MovieClip localToGlobal...
Page 612: ...612 Chapter 2 ActionScript Language Reference See also MovieClipLoader onLoadStart...
Page 623: ...NetConnection class 623 See also NetStream class Video attachVideo...
Page 649: ...Number 649 See also NaN Number class...
Page 679: ...on 679 on release trace X this _x trace Y this _y stopDrag See also onClipEvent...
Page 683: ...onUpdate 683 buttonLabel textColor my_mc labelColor...
Page 788: ...788 Chapter 2 ActionScript Language Reference See also private public...
Page 1001: ...Video height 1001 my_mc _height my_mc my_video height See also MovieClip _height Video width...
Page 1022: ...1022 Chapter 2 ActionScript Language Reference See also XML createElement...
Page 1057: ...XML xmlDecl 1057 See also XML docTypeDecl XML toString...
Page 1070: ...1070 Chapter 2 ActionScript Language Reference...