The Flash Document Object Model

The Flash Document Object Model (DOM) for the Flash JavaScript API consists of a set of top-level functions (see Top-Level Functions and Methods) and two top-level objects--the FLfile object and the flash object (fl). Each object is guaranteed to be available to a script because it always exists when the Flash authoring environment is open. For more information, see FLfile object and flash object (fl).

When referring to the flash object, you can use flash or fl. For example, to close all open FLA files, you can use either of the following statements:

flash.closeAll();
fl.closeAll();

The flash object contains the following child objects:

Object

How to access

actionsPanel object

Use fl.actionsPanel to access the actionsPanel object. This object corresponds to the Actions panel in the Flash authoring environment.

compilerErrors object

Use fl.compilerErrors to access the compilerErrors object. This object corresponds to the Compiler Errors panel in the Flash authoring environment.

componentsPanel object

Use fl.componentsPanel to access the componentsPanel object. This object corresponds to the Components panel in the Flash authoring environment.

Document object

Use fl.documents to retrieve an array of all the open documents; use fl.documents[index] to access a particular document; use fl.getDocumentDOM() to access the current document (the one with focus).

drawingLayer object

Use fl.drawingLayer to access the drawingLayer object.

Effect object

Use fl.effects to retrieve an array of effect descriptors that corresponds to the effects registered when Flash starts; use fl.effects[index] to access a particular effect; use fl.activeEffect to access the effect descriptor for the current effect being applied.

Math object

Use fl.Math to access the Math object.

outputPanel object

Use fl.outputPanel to access the outputPanel object. This object corresponds to the Output panel in the Flash authoring environment.

Project object

Use fl.getProject() to return a Project object for the currently open project.

Tools object

Use fl.tools to access an array of Tools objects.

XMLUI object

Use fl.xmlui to access an XML User Interface (XMLUI) object. The XMLUI object provides the ability to get and set properties of an XMLUI dialog box.

This section describes the following topics:

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00003803.html