User Guide

108 Chapter 5: Fireworks JavaScript API
Example
fw.getDocumentDOM().addBehavior("MM_statusMessage(\"Status Message!\")",
"onMouseOver", -1);
MM_swapImage
Availability
Fireworks 3.
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.