beautypg.com

Flfile.uritoplatformpath(), Flfile.write() – Adobe Extending Flash Professional CS5 User Manual

Page 298

background image

276

EXTENDING FLASH PROFESSIONAL

FLfile object

Last updated 5/2/2011

FLfile.uriToPlatformPath()

Availability
Flash CS4 Professional.

Usage

FLfile.uriToPlatformPath(fileURI)

Parameters

fileURI

A string, expressed as a file:/// URI, specifying the filename you want to convert.

Returns
A string representing a platform-specific path.

Description
Method; converts a filename expressed as a file:/// URI to a platform-specific format.

Example
The following example converts a file:/// URI to a platform-specific format:

var dir =(fl.configDirectory);
var URI = FLfile.platformPathToURI(dir);
fl.trace(URI == fl.configURI); // displays "true"

See also

FLfile.platformPathToURI()

FLfile.write()

Availability
Flash MX 2004 7.2.

Usage

FLfile.write(fileURI, textToWrite, [ , strAppendMode])

Parameters

fileURI

A string, expressed as a file:/// URI, specifying the file to which you want to write.

textToWrite

A string representing the text you want to place in the file.

strAppendMode

An optional string with the value

"append"

, which specifies that you want to append textToWrite to

the existing file. If omitted, fileURI is overwritten with textToWrite.

Returns
A Boolean value of

true

if successful;

false

otherwise.

This manual is related to the following products: