removeListener (FileReferenceList.removeListener method)

public removeListener(listener:Object) : Boolean

Removes an object from the list of objects that receive event notification messages.

Availability: ActionScript 1.0; Flash Player 8

Parameters

listener:Object - An object that listens for a callback notification from the FileReferenceList event listeners.

Returns

Boolean - Returns true if the object is removed. Otherwise, this method returns false.

Example

The following example demonstrates the removeListener method.

import flash.net.FileReferenceList;

var listener:Object = new Object();
listener.onCancel = function(fileRefList:FileReferenceList) {
    trace("onCancel");
    trace(fileRefList.removeListener(this)); // true
}

listener.onSelect = function(fileRefList:FileReferenceList) {
    trace("onSelect: " + fileRefList.fileList.length);
}

var fileRef:FileReferenceList = new FileReferenceList();
fileRef.addListener(listener);
fileRef.browse();

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001687.html