Chapter 17: flash object (fl), Flash object (fl) – Adobe Extending Flash Professional CS4 User Manual

Page 240

Advertising
background image

218

Chapter 17: flash object (fl)

Availability
Flash MX 2004.

Description
The flash object represents the Flash application. You can use

flash

or

fl

to refer to this object. This documentation

uses

fl

in code samples throughout.

Method summary
The following methods can be used with the flash object:

Method

Description

fl.addEventListener()

Registers a function to be called when a specific event is received.

fl.browseForFileURL()

Opens a File Open or File Save system dialog box and lets the user
specify a file to be opened or saved.

fl.browseForFolderURL()

Displays a Browse for Folder dialog box and lets the user select a folder.

fl.clipCopyString()

Copies the specified string to the Clipboard.

fl.closeAll()

Closes all open documents, displaying the Save As dialog box for any
documents that were not previously saved.

fl.closeAllPlayerDocuments()

Closes all the SWF files that were opened with Control

> Test Movie.

fl.closeDocument()

Closes the specified document.

fl.createDocument()

Opens a new document and selects it.

fl.downloadLatestVersion()

Downloads from the Version Cue server the latest version of a file that
is not currently open.

fl.fileExists()

Checks whether a file already exists on disk.

fl.findDocumentDOM()

Lets you target a specific file by using its unique identifier.

fl.findDocumentIndex()

Returns an array of integers that represent the position of a document
in the

fl.documents

array.

fl.findObjectInDocByName()

Exposes elements with instance names that match specified text.

fl.findObjectInDocByType()

Exposes elements of a specified element type in a document.

fl.getAppMemoryInfo()

Returns an integer that represents the number of bytes being used in
a specified area of Flash.exe memory.

fl.getDocumentDOM()

Retrieves the DOM (

Document object

) of the currently active

document.

fl.isFontInstalled()

Determines whether a specified font is installed.

fl.mapPlayerURL()

Maps an escaped Unicode URL to a UTF-8 or MBCS URL.

fl.openDocument()

Opens a Flash (FLA) document for editing in a new Flash Document
window and gives it focus.

fl.openScript()

Opens a script (JSFL, AS, ASC) or other file (XML, TXT) in the Flash text
editor.

Advertising