STF.writeString()

Availability

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

Usage

STF.writeString(fileName:String, textToWrite:String) : Boolean

Parameters

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

textToWrite - Text string.

Returns

A boolean.; ; 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; Writes the specified text string to a file. The existing content of the file is deleted.

Example

The following example renames and moves a file.

var success:Boolean;
onWriteStringReturn = function(returnValue:Boolean) {  // callback function
	success = returnValue;
}
STF.registerCallBack("writeString", onWriteStringReturn, this);  // register callback function
STF.writeString("File.txt","hello");		//write string

See Also

STF.readString(), STF.appendString()