Parameters
target_mc: MovieClip [optional]
MovieClipLoader.loadClip()
loadedBytes: Number
invoked.
totalBytes: Number
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
[optional] - A movie clip loaded by a
target_mc:
- The number of bytes that had been loaded when the listener was invoked.
loadedBytes:
- The total number of bytes in the file being loaded.
totalBytes:
Example
The following example creates a new movie clip, a new
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)
(MovieClipLoader.loadClip method)
method)
540
ActionScript classes
method.
The number of bytes that had been loaded when the listener was
The total number of bytes in the file being loaded.
,
getProgress (MovieClipLoader.getProgress
A movie clip loaded by a
MovieClipLoader.loadClip()
MovieClipLoader
,
loadClip
method.
and an anonymous