Fl.isfontinstalled(), Fl.librarypath – Adobe Extending Flash Professional CS4 User Manual

Page 260

Advertising
background image

238

EXTENDING FLASH CS4 PROFESSIONAL

flash object (fl)

Description
Method; retrieves the DOM (

Document object

) of the currently active document (FLA file). If one or more documents

are open but a document does not currently have focus (for example, if a JSFL file has focus), retrieves the DOM of the
most recently active document.

Example
The following example displays the name of the current or most recently active document in the Output panel:

var currentDoc = fl.getDocumentDOM();

fl.trace(currentDoc.name);

fl.isFontInstalled()

Availability
Flash CS4 Professional.

Usage

fl.isFontInstalled(fontName)

Parameters

fontName

A string that specifies the name of a device font.

Returns
A Boolean value of

true

if the specified font is installed;

false

otherwise.

Description
Method; determines whether a specified font is installed.

Example
The following code displays “true” in the Output panel if the Times font is installed.

fl.trace(fl.isFontInstalled("Times"));

fl.libraryPath

Availability
Flash CS4 Professional.

Usage

fl.libraryPath

Description
Property; a string that contains a list of items in the global ActionScript 3.0 Library path, which specifies the location
of SWC files or folders containing SWC files. Items in the string are delimited by semi-colons. In the authoring tool,
the items are specified by choosing Edit > Preferences

> ActionScript > ActionScript 3.0 Settings.

Advertising