EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Removelistener (Moviecliploader.removelistener Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
960 ActionScript classes
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 Player 7
Parameters
listener:Object - A listener object that was added by using
MovieClipLoader.addListener().
Returns
Boolean - A Boolean value. Returns true if the listener was removed successfully; otherwise
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
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;
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
//
start_button.clickHandler = function() {
trace("Starting...");
start_button.enabled = false;
stop_button.enabled = true;
//

Table of Contents

Related product manuals