User Guide

MovieClipLoader 533
trace(">> checking progress now with : " + interval.id);
var progress:Object = mcLoader.getProgress(image);
trace("bytesLoaded: " + progress.bytesLoaded + " bytesTotal: " +
progress.bytesTotal);
if(progress.bytesLoaded == progress.bytesTotal) {
clearInterval(interval.id);
}
}
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 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 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 using
MovieClipLoader.addListener(listenerObject) to
register it with the MovieClipLoader class.
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 are executed, so you can begin manipulating the loaded clip. This handler is
called after the
onLoadComplete handler. For most purposes, use the onLoadInit
handler.
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.