beautypg.com

Fl.documents, Fl.downloadlatestversion(), Currently open, use – Adobe Extending Flash Professional CS4 User Manual

Page 252

background image

230

EXTENDING FLASH CS4 PROFESSIONAL

flash object (fl)

fl.trace("Number of template types: " + fl.createNewTemplateList.length); for (i = 0; i <

fl.createNewTemplateList.length; i++) fl.trace("type: " + fl.createNewTemplateList[i]);

fl.documents

Availability
Flash MX 2004.

Usage

fl.documents

Description
Read-only property; an array of Document objects (see

Document object

) that represent the documents (FLA files)

that are currently open for editing.

Example
The following example stores an array of open documents in the

docs

variable:

var docs = fl.documents;

The following example displays the names of currently open documents, in the Output panel:

for (doc in fl.documents) {

fl.trace(fl.documents[doc].name);

}

fl.downloadLatestVersion()

Availability
Flash CS3 Professional.

Usage

fl.downloadLatestVersion(fileURI)

Parameters

fileURI

A string, expressed as a file:/// URI, that specifies the local path of the file to be downloaded from the Version

Cue server. Only files that are not already opened can be downloaded. If the file specified by fileURI is already open,
this method has no effect.

Returns
A Boolean value of

true

if the file was downloaded successfully;

false

otherwise.

Description
Method; downloads from the Version Cue server the latest version of a file that is not currently open. To download
the latest version of an open file, use

document.synchronizeWithHeadVersion()

.