The following example uses a file mask in the specified
to return the names of all
folderURI
the executable files in the Windows application folder:
var executables = FLfile.listFolder("file:///C|/WINDOWS/*.exe","files")
alert(executables.join("\n"))
FLfile.read()
Availability
Flash MX 2004 7.2.
Usage
FFLfile.read()
Parameters
A string, expressed as a file:/// URI, specifying the file or folder whose
fileOrFolderURI
attributes you want to retrieve.
Returns
The contents of the specified file as a string, or
if the read fails.
null
Description
Method; returns the contents of the specified file as a string, or
if the read fails.
null
Examples
The following example reads the file mydata.txt and, if successful, displays an alert box with
the contents of the file.
var fileURI = "file:///c|/temp/mydata.txt";
var str = FLfile.read( fileURI);
if (str) {
alert( fileURL + " contains: " + str);
}
The following example reads the ActionScript code from a class file and stores it in the
code
variable:
var classFileURI = "file:///C|/MyApplication/TextCarousel.as";
var code = Flfile.read(classFileURI);
266
Objects
Need help?
Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?