See also
addListener (MovieClipLoader.addListener method)
(MovieClipLoader.loadClip method)
,
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
handler was invoked. No further loading messages will be received.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- A listener object that was added using
listener:Object
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
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;
};
542
ActionScript classes
,
onLoadError (MovieClipLoader.onLoadError
.
start_button
,
loadClip
MovieClipLoader
and
. When the
stop_button
,
event