MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 589

Actionscript 2.0 language reference
Table of Contents

Advertisement

A list of file type descriptions followed by their Windows file extensions and their
Macintosh file types.
Each element in the array must contain a string that describes the file type; a semicolon-
delimited list of Windows file extensions, with a wildcard (*) character preceding each
extension; and a semicolon-delimited list of Macintosh file types, with a wildcard (*)
character preceding each type. The syntax for each element is as follows:
[{description: "string describing the first set of file types",
extension: "semicolon-delimited list of Windows file extensions",
macType: "semicolon-delimited list of Macintosh file types"}]
Example:
[{description: "Image files", extension: "*.jpg;*.gif;*.png", macType:
"JPEG;jp2_;GIFf;PNGf"}, {description: "Flash Movies", extension:
"*.swf", macType: "SWFL"}]
The two formats are not interchangeable in a single
other.
The list of extensions is used to filter the files in Windows, depending on the file type the user
selects. It is not actually displayed in the dialog box. To display the file types for users, you
must list the file types in the description string as well as in the extension list. The description
string is displayed in the dialog box in Windows. (It is not used on the Macintosh.) On the
Macintosh, if you supply a list of Macintosh file types, that list is used to filter the files. If you
don't supply a list of Macintosh file types the list of Windows extensions is used.
Returns
- Returns
Boolean
true
displayed. Returns
false
in progress, or if you use the
extension string in any element in the array.
Example
The following example demonstrates the
import flash.net.FileReferenceList;
var allTypes:Array = new Array();
var imageTypes:Object = new Object();
imageTypes.description = "Images (*.JPG;*.JPEG;*.JPE;*.GIF;*.PNG;)";
imageTypes.extension = "*.jpg; *.jpeg; *.jpe; *.gif; *.png;";
allTypes.push(imageTypes);
var textTypes:Object = new Object();
textTypes.description = "Text Files (*.TXT;*.RTF;)";
if the parameters are valid and the file-browsing dialog box is
if the dialog box is not displayed, if another browse session is already
parameter but fail to provide a description or
typelist
browse()
FileReferenceList (flash.net.FileReferenceList)
call. You must use one or the
browse()
method.
589

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF