Moviecliploader.removelistener() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

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 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;
//
image_mcl.addListener(mclListener);
image_mcl.loadClip("http://www.macromedia.com/devnet/images/160x160/
flex_logo.jpg", image_mc);
};
stop_button.clickHandler = function() {
trace("Stopping...");
A listener object that was added using MovieClipLoader.addListener().
start_button
MovieClipLoader
and
. When the user starts
stop_button
MovieClipLoader.removeListener()
617

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents