588
ActionScript classes
var fileRef:FileReferenceList = new FileReferenceList();
fileRef.addListener(listener);
fileRef.browse();
browse (FileReferenceList.browse method)
public browse([typelist:Array]) : Boolean
Displays a file-browsing dialog box in which the user can select one or more local files to
upload. The dialog box is native to the user's operating system. When you call this method
and the user successfully selects files, the
fileList
property of this FileReferenceList object is
populated with an array of FileReference objects, one for each file selected by the user. Each
subsequent time that
FileReferenceList.browse()
is called, the FileReferenceList.fileList
property is reset to the file or files selected by the user in the dialog box.
You can pass an array of file types to determine which files the dialog box displays.
Only one
browse()
or
download()
session can be performed at a time on a FileReferenceList
object (because only one dialog box can be displayed at a time).
Availability:
ActionScript 1.0; Flash Player 8
Parameters
typelist
:Array
[optional] - An array of file types used to filter the files that are displayed in
the dialog box. If you omit this parameter, all files are displayed. If you include this parameter,
the array must contain one or more elements enclosed in curly braces { }. You can use one of
two formats for the array:
■
A list of file type descriptions followed by their Windows file extensions only.
Each element in the array must contain a string that describes the file type and a
semicolon-delimited list of Windows file extensions, with a wildcard (*) character
preceding each extension. The syntax for each element is as follows:
[{description: "
string describing the first set of file types
",
extension: "
semicolon-delimited list of file extensions
"}]
Example:
[{description: "Images", extension: "*.jpg;*.gif;*.png"}, {description:
"Flash Movies", extension: "*.swf"}, {description: "Documents",
extension: "*.doc;*.pdf"}]
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...