ssMovieClipLoader.onLoadInit

The movieclip is now ready to have actions taken upon it.


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.


Notes:

Event; all code from the first frame of the loaded movieclip will have taken place by the time this event is triggered. This 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.onLoadInit = function (target_mc)
{
    ssDebug.trace("onLoadInit"+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.onLoadInit = function (target_mc)
{
    ssDebug.trace("onLoadInit"+target_mc);
}

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