EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Oncancel (Filereference.oncancel Event Listener)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
570 ActionScript classes
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();
See also
browse (FileReference.browse method)
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
Parameters
fileRef:flash.net.FileReference - The FileReference object that initiated the operation.
Example
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.");
}

Table of Contents

Related product manuals