MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 259

Extending flash
Table of Contents

Advertisement

Examples
The following example checks for a file called mydata.txt and displays an alert box indicating
whether the file exists.
var fileURI = "file:///c|/temp/mydata.txt";
if (FLfile.exists(fileURI)) {
alert( fileURI + " exists!");
}
else {
alert( fileURI + " does not exist.");
}
The following example checks to see if a required configuration file exists. If the file doesn't
exist, it is created:
var configFile = "file:///C|/MyApplication/config.ini";
if (!FLfile.exists(configFile)) {
FLfile.write(configFile,"")
}
See also
FLfile.write()
FLfile.getAttributes()
Availability
Flash MX 2004 7.2.
Usage
FLfile.getAttributes( fileOrFolderURI )
Parameters
fileOrFolderURI
attributes you want to retrieve.
Returns
A string that represents the attributes of the specified file or folder.
Results are unpredictable if the file or folder doesn't exist. You should use
FLfile.exists()
A string, expressed as a file:/// URI, specifying the file or folder whose
before using this method.
FLfile object
259

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents