User Guide

540 ActionScript classes
Parameterstarget_mc: MovieClip [optional] A movie clip loaded by a
MovieClipLoader.loadClip() method.
loadedBytes: Number The number of bytes that had been loaded when the listener was
invoked.
totalBytes: Number The total number of bytes in the file being loaded.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
target_mc: [optional] - A movie clip loaded by a MovieClipLoader.loadClip() method.
loadedBytes: - The number of bytes that had been loaded when the listener was invoked.
totalBytes: - The total number of bytes in the file being loaded.
Example
The following example creates a new movie clip, a new MovieClipLoader and an anonymous
event listener. It should periodically output the progress of a load and finally provide
notification when the load is complete and the asset is available to ActionScript.
var container:MovieClip = this.createEmptyMovieClip("container",
this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number,
bytesTotal:Number):Void {
trace(target + ".onLoadProgress with " + bytesLoaded + " bytes of " +
bytesTotal);
}
listener.onLoadInit = function(target:MovieClip):Void {
trace(target + ".onLoadInit");
}
mcLoader.addListener(listener);
mcLoader.loadClip("http://www.w3.org/Icons/w3c_main.png", container);
See also
addListener (MovieClipLoader.addListener method), loadClip
(MovieClipLoader.loadClip method)
, getProgress (MovieClipLoader.getProgress
method)