User Guide
Document functions 105
Example
The following command adds a simple rollover behavior at the end of the selected slice
or Hotspot.
fw.getDocumentDOM().addBehavior("MM_simpleRollover()", "onMouseOver", -1);
See also
dom.removeBehavior()
Using the dom.addBehavior() function
The following code shows the syntax for
dom.addBehavior():
fw.getDocumentDOM().addBehavior(action, event, eventindex);
The first argument is a string that specifies the behavior to be added; see “dom.addBehavior()”
on page 104. The information in this section describes the acceptable values for the
action
argument that is passed to
dom.addBehavior().
MM_nbGroup [down]
Availability
Fireworks 3.
Arguments
type, barName, target, swapFrame, fileName, preload
• Pass "down" for type.
• Pass "navbar1" for the name of the navigation bar.
• 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).
Description
Sets a navigation bar “down” behavior.
Example
fw.getDocumentDOM().addBehavior("MM_nbGroup(\'down\',\'navbar1\',-
1,2,\"\",1)", "onClick", -1);