ssMovieClipLoader.onLoadProgress

Event called during the loading of the file to indicate current progress of the download/load.


Availability:

First available in version 3.0 build 2039.

Not available in ActionScript 3.


Event Handler Parameters:

target - MovieClip - The movieclip that this event pertains to.

bytesLoaded - Number - The number of bytes that have been loaded into the movieclip since the start of the load.

bytesTotal - Number - The size of the loading file in bytes.


Notes:

Event; can be specified as an event handler directly on the ssMovieClipLoader instance, or as an event in the addListener method. The examples below demonstrate both ways to handle events.


Examples:

Example 1
First we create a new instance of ssMovieClipLoader. Once the event is triggered the event handler on our new instance is called.

var loader_mcl = new ssMovieClipLoader();

loader_mcl.onLoadProgress = function (target_mc,bytesLoaded,totalBytes)
{
    ssDebug.trace("onLoadProgress:"+target_mc);
}

loader_mcl.loadClip("file.swf",_level0.my_mc);

Example 2
First we create a new instance of ssMovieClipLoader. Then we create an object that has our event handler. We add the object as a listener to the event. And then we load the movie via loadClip. Once the event is triggered the event handler on our new object is called.

var loader_mcl = new ssMovieClipLoader();

var myListener_obj = new Object;
myListener_obj.onLoadProgress = function (target_mc,bytesLoaded,totalBytes)
{
    ssDebug.trace("onLoadProgress:"+target_mc);
}

loader_mcl.addListener(myListener_obj);
loader_mcl.loadClip("file.swf",_level0.my_mc);