User Guide

File class 77
Returns
A Boolean value indicating whether the file opened successfully (true) or not (false).
Description
Method; opens a file so that you can read from it or write to it. First, you must create a file
object and then call the
open() method on that object. There are no default values for the
type and mode parameters—values must be specified.
Example
The following if statement lets you insert code that executes when a text file is opened in read
mode:
if (myFileObject.open("text", "read") ){
// Do something here.
}
File.position
Availability
Flash Media Server 2.
Usage
fileObject.position
Description
Property; the current offset in the file. This is the only property that can be set. Setting this
property performs a seek operation on the file. The property is undefined for closed files.
File.read()
Availability
Flash Media Server 2.
Usage
fileObject.read(numChars)
Parameters
numChars An integer specifying the number of characters to read. If numChars specifies
more bytes than are left in the file, the method reads to the end of the file.