Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > FileReference (flash.net.FileReference) > onCancel (FileReference.onCancel event listener) | |||
onCancel = function(fileRef:FileReference) {}
Invoked when the user dismisses the file-browsing dialog box. This dialog box is displayed when you call FileReference.browse(), FileReferenceList.browse(), or FileReference.download().
Availability: ActionScript 1.0; Flash Player 8
fileRef:flash.net.FileReference - The FileReference object that initiated the operation.
The following example traces a message if the user dismisses the file-browsing dialog box. This method is triggered only if the user clicks Cancel or presses the Escape key after the dialog box is displayed.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onCancel = function(file:FileReference):Void {
trace("onCancel");
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.macromedia.com/platform/whitepapers/platform_overview.pdf";
if(!fileRef.download(url, "FlashPlatform.pdf")) {
trace("dialog box failed to open.");
}
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/00002214.html