03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Parameters<br />

typelist:Array [optional] - An array of file types used to filter the files displayed in the<br />

dialog box. If you omit this parameter, all files are displayed. If you include this parameter, the<br />

array must contain one or more elements enclosed in curly braces { }. You can use one of two<br />

formats for the array:<br />

■ A list of file type descriptions followed by their Windows file extensions only. Each<br />

element in the array must contain a string that describes the file type <strong>and</strong> a semicolondelimited<br />

list of Windows file extensions, with a wildcard character (*) preceding each<br />

extension. The syntax for each element is as follows:<br />

[{description: "string describing the first set of file types",<br />

extension: "semicolon-delimited list of file extensions"}]<br />

Example:<br />

[{description: "Images", extension: "*.jpg;*.gif;*.png"}, {description:<br />

"SWF files", extension: "*.swf"}, {description: "Documents", extension:<br />

"*.doc;*.pdf"}]<br />

■ A list of file type descriptions followed by their Windows file extensions <strong>and</strong> their<br />

Macintosh file types. Each element in the array must contain a string that describes the file<br />

type; a semicolon-delimited list of Windows file extensions, with a wildcard character (*)<br />

preceding each extension; <strong>and</strong> a semicolon-delimited list of Macintosh file types, with a<br />

wildcard character (*) preceding each type. The syntax for each element is as follows:<br />

[{description: "string describing the first set of file types",<br />

extension: "semicolon-delimited list of Windows file extensions",<br />

macType: "semicolon-delimited list of Macintosh file types"}]<br />

Example:<br />

[{description: "Image files", extension: "*.jpg;*.gif;*.png", macType:<br />

"JPEG;jp2_;GIFF"}, {description: "SWF files", extension: "*.swf",<br />

macType: "SWFL"}]<br />

The two formats are not interchangeable in a single browse() call. You must use one or the<br />

other.<br />

The list of extensions is used to filter the files in Windows, depending on the file selected by<br />

the user. It is not actually displayed in the dialog box. To display the file types for users, you<br />

must list the file types in the description string as well as in the extension list. The description<br />

string is displayed in the dialog box in Windows. (It is not used on the Macintosh.) On the<br />

Macintosh, if you supply a list of Macintosh file types, that list is used to filter the files. If you<br />

don't supply a list of Macintosh file types, the list of Windows extensions is used.<br />

570 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!