The flash document object model – Adobe Extending Flash Professional CS4 User Manual
Page 31
9
EXTENDING FLASH CS4 PROFESSIONAL
Introduction
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
” on page 15) 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
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:
Rectangle object
The Rectangle object is a shape that is drawn using the Rectangle tool. To
determine if an item is a Rectangle object, use
shape.isRectangleObject
.
Screen object
The Screen object represents a single screen in a slide or form document.
ScreenOutline object
The ScreenOutline object represents the group of screens in a slide or form
document.
Shape object
The Shape object is a subclass of the Element object. The Shape object
provides more precise control than the drawing APIs for manipulating or
creating geometry on the Stage.
SoundItem object
The SoundItem object is a subclass of the Item object. It represents a library
item used to create a sound.
Stroke object
The Stroke object contains all the settings for a stroke, including the custom
settings.
swfPanel object
The swfPanel object represents a Windows SWF panel. Windows SWF panels
are SWF files that implement applications you can run from the Flash
authoring environment. The array of swfPanel objects is a property of the
flash object (
fl.swfPanels
).
SymbolInstance object
The SymbolInstance object is a subclass of the Instance object and represents
a symbol in a frame.
SymbolItem object
The SymbolItem object is a subclass of the Item object.
Text object
The Text object represents a single text item in a document.
TextAttrs object
The TextAttrs object contains all the properties of text that can be applied to
a subselection. This object is a subclass of the Text object.
TextRun object
The TextRun object represents a run of characters that have attributes that
match all of the properties in the TextAttrs object.
Timeline object
The Timeline object represents the Flash timeline, which can be accessed for
the current document by
fl.getDocumentDOM().getTimeline().
ToolObj object
A ToolObj object represents an individual tool in the Tools panel.
Tools object
The Tools object is accessible from the Flash object (
fl.tools
).
Vertex object
The Vertex object is the part of the shape data structure that holds the
coordinate data.
VideoItem object
The VideoItem object is a subclass of the Item object.
XMLUI object
The XMLUI object provides the ability to get and set properties of an XMLUI
dialog box, and accept or cancel out of one.
Object
Description