ssMovieClipLoader.onLoadError

The loading of the file was not successful.


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.

message - String - String returned containing the error.


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.onLoadError = function (target_mc,errorMessage)
{
    ssDebug.trace("onLoadError:"+target_mc+" - "+errorMessage);
}

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.onLoadError = function (target_mc,errorMessage)
{
    ssDebug.trace("onLoadError:"+target_mc+" - "+errorMessage);
}

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