Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > FileReference (flash.net.FileReference) > removeListener (FileReference.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
listener:Object - An object that listens for a callback notification from the FileReference event listeners.
Boolean - Returns true if the object specified in the listener parameter was successfully removed. Otherwise, this method returns false.
The following example removes an event listener using the removeListener method. If a user cancels the download, the listener is removed so that it no longer receives events from that FileReference object.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onCancel = function(file:FileReference):Void {
trace(file.removeListener(this)); // true
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.macromedia.com/platform/whitepapers/platform_overview.pdf";
fileRef.download(url, "FlashPlatform.pdf");
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002222.html