Register the listener object with the MovieClipLoader object
object to receive the loading events, you must register it with the MovieClipLoader object, as
shown in the following code:
my_mcl.addListener(mclListener);
Begin loading the file (image or SWF) into a target clip
SWF file, you use the
code:
my_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg",
img_mc);
You can use MovieClipLoader methods only to track the downloading progress of files
loaded with the
function or
MovieClip.loadMovie()
The following example uses the
display the downloading progress of a SWF file. (See "ProgressBar.setProgress()" in
Components Language Reference.)
To display downloading progress by using the ProgressBar component:
1.
Create a new Flash document, and save it as progress.fla.
2.
Open the Components panel (Window > Components).
3.
Drag a ProgressBar component from the Components panel to the Stage.
4.
In the Property inspector (Window > Properties > Properties), name the ProgressBar
component
my_pb
5.
Select Frame 1 in the Timeline, and open the Actions panel (Window > Actions).
MovieClipLoader.loadClip()
MovieClipLoader.loadClip()
method.
setProgress()
.
In order for the listener
To start downloading an image or
method, as shown in the following
method. You cannot use the
method of the ProgressBar component to
Loading external SWF and image files
loadMovie()
595
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?