The Flash Document Object Model - MACROMEDIA FLASH 8-EXTENDING FLASH Manual

Extending flash
Table of Contents

Advertisement

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
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
When referring to the flash object, you can use
files, you can use either of the following statements:
flash.closeAll();
fl.closeAll();
The flash object contains the following child objects:
Object
componentsPanel object
Document object
drawingLayer object
Effect object
Math object
outputPanel object
Project object
Tools object
XMLUI object
14
Introduction
"Top-Level Functions and Methods" on page
and
flash object
How to access
Use
fl.componentsPanel
This object corresponds to the Components panel in the Flash
authoring environment.
Use
fl.documents
use
fl.documents[index]
fl.getDocumentDOM()
with focus).
Use
fl.drawingLayer
Use
to retrieve an array of effect descriptors that
fl.effects
corresponds to the effects registered when Flash starts; use
fl.effects[index]
fl.activeEffect
effect being applied.
Use
to access the Math object.
fl.Math
Use
fl.outputPanel
corresponds to the Output panel in the Flash authoring
environment.
Use
fl.getProject()
open project.
Use
to access an array of Tools objects.
fl.tools
Use
to access an XML User Interface (XMLUI) object.
fl.xmlui
The XMLUI object provides the ability to get and set properties of
an XMLUI dialog box.
(fl).
or
. For example, to close all open
flash
fl
to access the componentsPanel object.
to retrieve an array of all the open documents;
to access a particular document; use
to access the current document (the one
to access the drawingLayer object.
to access a particular effect; use
to access the effect descriptor for the current
to access the outputPanel object. This object
to return a Project object for the currently
23) and two top-level

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents