35
EXTENDING FIREWORKS
The Document object
Las
t
up
d
a
ted
12/8/2009
Returns
Nothing.
Description
Adds a new empty mask to the selected element. If the selection already has an element mask, it is replaced with the
new one. Only one element can be selected when calling this function. If selecting more than one element (or none) at
the time this function is called, Fireworks throws an exception.
dom.addFrames()
Availability
Fireworks 3, enhanced in Fireworks 4.
Usage
dom.addFrames(
howMany, where
, {
bAdvanceActiveFrame
})
Arguments
howMany
An integer that specifies how many frames to add.
where
The location where frames should be added. Acceptable values for
where
are
"beginning"
,
"before
current"
,
"after current"
, and
"end"
.
bAdvanceActiveFrame
Added in Fireworks 4, specifies whether to change the active frame. If it is omitted or
true
,
this function sets the active frame to the first frame added. If
false
, the active frame does not change. For example, if
the user is adding frames at the end of a document that has two frames and
bAdvanceActiveFrame
is omitted or
true
,
then the third frame becomes the active frame.
Returns
Nothing.
Description
Adds one or more frames to the document.
Example
The following command adds one frame after the current frame but does not change the active frame:
fw.getDocumentDOM().addFrames(1, "after current", false);
dom.addGuide()
Availability
Fireworks 3.
Usage
dom.addGuide(float
position, guidekind
)
Arguments
position
A floating-point value that specifies the
x
or
y
coordinate at which to add the guide.