132
Fireworks JavaScript API
Working with selected elements
Many API functions in this chapter refer to a “selection” or to “selected items.” These terms
refer to Fireworks elements, such as text boxes or images, that are currently selected. In most
cases, the functions work even if only one item is selected. If a function requires more than
one selected item, this is noted in the description of the function.
Palette or panel
Several API functions reference the History panel (see
“History panel functions”
on page 350
). Throughout the Fireworks documentation and online help, the term
palette
is
reserved for discussions of a color palette, and the term
panel
is used to refer to the floating
windows that are available within Fireworks. Therefore, when the function name contains
palette, the descriptions refer to a panel.
Document functions
As discussed in an earlier section, you get and set document properties by calling functions as
methods of the document’s Document Object Model (DOM) (see
“Accessing a Fireworks
document” on page 10
). Methods that operate on a document’s DOM are listed in this
section as
dom.functionName()
. However, you cannot simply type
dom.functionName()
. In
place of
dom
, you must type
fw.getDocumentDOM()
or
fw.documents[documentIndex]
. For
example:
■
How a function looks in this manual:
dom.addNewHotspot()
■
How you must type it:
fw.getDocumentDOM().addNewHotspot(); // operates on active document
or
fw.documents[
documentIndex
].addNewHotspot(); // operates on specified
document
dom.addBehavior()
Availability
Fireworks 3.
Usage
dom.addBehavior(
action
,
event
,
eventIndex
)
Summary of Contents for FIREWORKS 8-EXTENDING FIREWORKS
Page 1: ...Extending Fireworks ...
Page 4: ...4 Contents ...
Page 358: ...358 Fireworks JavaScript API ...
Page 372: ...372 Index ...