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 Player 7
Parameters
- A listener object that was added by using
listener:Object
MovieClipLoader.addListener()
Returns
- A Boolean value. Returns
Boolean
.
false
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;
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
//
start_button.clickHandler = function() {
trace("Starting...");
start_button.enabled = false;
stop_button.enabled = true;
//
960
ActionScript classes
.
if the listener was removed successfully; otherwise
true
start_button
MovieClipLoader
and
. When the
stop_button
event
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?