mFile.readString()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows NT Support: Flash 7 SWF + mProjector 2.0;

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 2.0; replacing mProjector 1.0 async

Usage

mFile.readString(fileName:String) : String

Parameters

fileName - Name (including the path) of the file to read. Platform Implementation Differences: On Windows the file name must include a fully qualified path. On the Mac if no path is specified, the working directory is used.

Returns

A string.; ;

Description

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

Example

The following example reads the contents of a file.

var success:Boolean;
var filename:String = mSystem.getSpecialFolder("WORKING") + mSystem.getPathDelimiter() + "temp.txt";
var stringReadFromFile = mFile.readString(fileName);

Code Examples

Reading and Writing to Hard Drive, Project Files, mProjector Class Basics -- mFile