User Guide

FileReference (flash.net.FileReference) 563
Returns
Boolean - Returns true if the parameters are valid and the file-browsing dialog box is
displayed. Returns
false if the dialog box is not displayed, if another browse session is already
in progress, or if you use the
typelist parameter but fail to provide a description or
extension string in any element in the array.
Example
The following example displays a dialog box in which the user can select an image file to be
uploaded.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("Opened " + file.name);
}
listener.onCancel = function(file:FileReference):Void {
trace("User cancelled");
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();
See also
onSelect (FileReferenceList.onSelect event listener), onCancel
(FileReference.onCancel event listener)
, download (FileReference.download
method)
, browse (FileReferenceList.browse method)
cancel (FileReference.cancel method)
public cancel() : Void
Cancels any ongoing upload or download operation on this FileReference object.
Availability: ActionScript 1.0; Flash Player 8