See also
MovieClipLoader.onLoadError, MovieClipLoader.onLoadInit,
MovieClipLoader.onLoadComplete
MovieClipLoader.removeListener()
Availability
Flash Player 7.
Usage
my_mcl.removeListener(listenerObject:Object) : Void
Parameters
listenerObject
Returns
Nothing.
Description
Method; removes the listener that was used to receive notification when a
event handler was invoked. No further loading messages will be received.
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
or stops the progress, information writes to the log file.
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;
//
image_mcl.addListener(mclListener);
A listener object that was added using
start_button
MovieClipLoader.addListener()
MovieClipLoader
and
. When the user starts
stop_button
MovieClipLoader.removeListener()
.
645
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?