}
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()
FileReference.download()
Availability: ActionScript 1.0; Flash Player 8
Parameters
fileRef:flash.net.FileReference
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.");
}
570
ActionScript classes
,
FileReferenceList.browse()
.
- The FileReference object that initiated the operation.
, or
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?