STF.readString()

Availability

Flash AS2.0 SWF w/ ScreenTimeScreenSaver component + ScreenTime 3.0 / 3.0

Usage

STF.readString(fileName:String) : String

Parameters

fileName - Name of the file to read. If no path is specified, the working directory is used.

Returns

A string.; ; This value is returned as a parameter to the registered callback. See the example below or STF.registerCallBack() for more information on return variable handling.

Description

Method; Reads the contents of the specified file into a string.

Example

The following example reads the contents of a file.

var content:String;
onReadStringReturn = function(returnValue:String) {  // define callback
	content = returnValue;
}
STF.registerCallBack("readString", onReadStringReturn, this);  // register callback function
STF.readString("File.txt");

See Also

STF.writeString(), STF.appendString()