34
EXTENDING FIREWORKS
The Document object
Las
t
up
d
a
ted
12/8/2009
Arguments
target, swapFrame, fileName, preload, restoreOnMouseOut
•
target
specifies the slice to which the behavior is attached. Pass
1
– for this value; all other values are used internally
by Fireworks.
•
swapFrame
is an integer value that specifies the frame to swap, starting with
0
(although, to use
fileName
as a URL,
pass –
1
here).
•
fileName
specifies the frame or file to swap. If you specified a frame to use in
swapFrame
, pass an empty text string.
If you want to specify a filename and you passed –
1
for
swapFrame
, pass the string for the relative URL of the image.
•
preload
is a binary value that specifies whether to preload the swapped image (pass
1
) or not (pass
0
).
•
restore
is a binary value that specifies whether to restore on a mouse out action (pass
1
) or not (pass
0
).
Description
Adds a swap image behavior.
Example
fw.getDocumentDOM().addBehavior("MM_swapImage(-1,1,\"\",1,1)", "onMouseOver", -1);
MM_swapImgRestore
Availability
Fireworks 3.
Arguments
None.
Example
fw.getDocumentDOM().addBehavior("MM_swapImgRestore()", "onMouseOut", -1);
Description
Adds a swap image restore behavior.
dom.addElementMask()
Availability
Fireworks 4.
Usage
dom.addElementMask(mode, {
bEnterMaskEditMode
})
Arguments
mode
Acceptable values for
mode
are “
reveal all", "hide all", "reveal selection",
and
"hide selection"
.
If the user is not in bitmap mode, or if there is no pixel selection,
"reveal selection"
and
"hide selection"
operate the same as
"reveal all"
and
"hide all"
, respectively.
bEnterMaskEditMode
If
bEnterMaskEditMode
(optional) is set to
true
, Fireworks enters mask-edit mode on the
newly added mask; if omitted, it defaults to
false
.