onLoadProgress = function([target_mc], loadedBytes, totalBytes) {}
Invoked every time the loading content is written to disk during the loading process (that is, between MovieClipLoader.onLoadStart and MovieClipLoader.onLoadComplete). Call this listener on a listener object that you add using MovieClipLoader.addListener(). You can use this method to display information about the progress of the download, using the loadedBytes and totalBytes parameters.
The value for target_mc identifies the movie clip this call is being made for. This is useful if you are loading multiple files with the same set of listeners.
Note: If you attempt to use onLoadProgress in test movie mode with a local file that resides on your hard disk, it will not work properly because, in test movie mode, Flash Player loads local files in their entirety.
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.
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.
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);
addListener (MovieClipLoader.addListener method), loadClip (MovieClipLoader.loadClip method), getProgress (MovieClipLoader.getProgress method)