The target path of a movie clip, or an integer specifying the level in Flash Player into
target
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
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
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
•
The
MovieClipLoader.onLoadError
•
The
MovieClipLoader.onLoadProgress
•
The
MovieClipLoader.onLoadInit
the clip have executed, so you can begin manipulating the loaded clip.
•
The
MovieClipLoader.onLoadComplete
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
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 cancel a load operation that is in progress.
MovieClipLoader.getProgress()
report the actual
local. When you use the Bandwidth Profiler feature in the authoring environment,
MovieClipLoader.getProgress()
the download at the actual download rate, not at the reduced bandwidth rate that the Bandwidth
Profiler provides.
Example
The following example illustrates the use of many of the MovieClipLoader class methods and
listeners:
// first set of listeners
var my_mcl:MovieClipLoader = new MovieClipLoader();
636
Chapter 7: ActionScript for Flash
true
.
loadMovie()
method to load one or more files into a single movie clip or level;
loadClip()
and
and
bytesLoaded
bytesTotal
and
if the URL request was sent successfully; otherwise the
or
MovieClip.loadMovie()
.
handler is invoked when loading begins.
handler is invoked if the clip cannot be loaded.
handler is invoked as the loading process progresses.
handler is invoked after the actions in the first frame of
handler is invoked when a file has completed
to remove movies or images loaded with this method or
MovieClipLoaderListener.onLoadProgress
values in the Authoring player when the files are
MovieClipLoaderListener.onLoadProgress
has a number of
do not
report
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?