User Guide

542 ActionScript classes
See also
addListener (MovieClipLoader.addListener method), loadClip
(MovieClipLoader.loadClip method)
, onLoadError (MovieClipLoader.onLoadError
event listener)
, onLoadInit (MovieClipLoader.onLoadInit event listener),
onLoadComplete (MovieClipLoader.onLoadComplete event listener)
removeListener (MovieClipLoader.removeListener
method)
public removeListener(listener:Object) : Boolean
Removes the listener that was used to receive notification when a MovieClipLoader event
handler was invoked. No further loading messages will be received.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
listener:Object - A listener object that was added using
MovieClipLoader.addListener().
Returns
Boolean -
Example
The following example loads an image into a movie clip, and enables the user to start and stop
the loading process using two buttons called
start_button and stop_button. When the
user starts or stops the progress, information is displayed in the Output panel.
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
trace("\t onLoadStart");
};
mclListener.onLoadComplete = function(target_mc:MovieClip) {
trace("\t onLoadComplete");
};
mclListener.onLoadError = function(target_mc:MovieClip, errorCode:String) {
trace("\t onLoadError: "+errorCode);
};
mclListener.onLoadInit = function(target_mc:MovieClip) {
trace("\t onLoadInit");
start_button.enabled = true;
stop_button.enabled = false;
};