Parameters
- An object that listens for a callback notification from the FileReference
listener:Object
event listeners.
Example
The following example adds a listener to an instance of FileReference.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onProgress = function(file:FileReference, bytesLoaded:Number,
bytesTotal:Number):Void {
trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " +
bytesTotal);
}
listener.onComplete = function(file:FileReference):Void {
trace("onComplete: " + file.name);
}
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");
browse (FileReference.browse method)
public browse([typelist:Array]) : Boolean
Displays a file-browsing dialog box in which the user can select a local file to upload. The
dialog box is native to the user's operating system. When you call this method and the user
successfully selects a file, the properties of this FileReference object are populated with the
properties of that file. Each subsequent time that
FileReference object's properties are reset to the file selected by the user in the dialog box.
Only one
or
browse()
dialog box can be displayed at a time).
You can pass an array of file types to determine which files the dialog box displays.
Availability: ActionScript 1.0; Flash Player 8
session can be performed at a time (because only one
download()
FileReference.browse()
FileReference (flash.net.FileReference)
is called, the
561
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?