User Guide

MovieClipLoader 949
var progress:Object = mcLoader.getProgress(image);
trace("bytesLoaded: " + progress.bytesLoaded + " bytesTotal: " +
progress.bytesTotal);
if(progress.bytesLoaded == progress.bytesTotal) {
clearInterval(interval.id);
}
}
If your SWF file includes a version 2 component, use the version 2 component's
DepthManager class instead of the
MovieClip.getNextHighestDepth() method, which is
used in this example.
See also
loadClip (MovieClipLoader.loadClip method), onLoadProgress
(MovieClipLoader.onLoadProgress event listener)
loadClip (MovieClipLoader.loadClip method)
public loadClip(url:String, target:Object) : Boolean
Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into a movie clip in
Flash Player while the original movie is playing. If you load an animated GIF, only the first
frame is displayed. Using this method you can display several SWF files at once and switch
between SWF files without loading another HTML document.
Using the
loadClip() method instead of loadMovie() or MovieClip.loadMovie() has a
number of advantages. The following handlers are implemented by the use of a listener object.
You activate the listener by registering it with the MovieClipLoader class by 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.onLoadComplete handler is invoked when a file completes
downloading, but before the loaded movie clip's methods and properties are available.
This handler is called before the
onLoadInit handler.
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. This handler is
called after the
onLoadComplete handler. For most purposes, use the onLoadInit
handler.