EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Browse (Filereference.browse Method)

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...
FileReference (flash.net.FileReference) 561
Parameters
listener:Object - An object that listens for a callback notification from the FileReference
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.browse() is called, the
FileReference object's properties are reset to the file selected by the user in the dialog box.
Only one
browse() or download() session can be performed at a time (because only one
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

Table of Contents

Related product manuals