STF.appendString()

Availability

Flash MX 2004 or 8 swf w/ ScreenTimeScreenSaver component + ScreenTime 3.0 / 3.0

Usage

STF.appendString(fileName:String, textToAppend:String) : Boolean

Parameters

fileName - Name of the file the string should be appended to. If a fully qualified path is not specified, the working directory is used.

textToAppend - Text string to apppend.

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 by appending it to the existing content.

Example

The following example writes a string to a file in the applications working directory. If no path is specified, the working directory is used.

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

See Also

STF.writeString(), STF.readString()