User Guide

Document functions 133
Arguments
action A string that specifies the behavior to be added, such as
"MM_swapImageRestore()". For a list of all the behaviors that can be added, see “Using the
dom.addBehavior() function” on page 133.
event The event that triggers the behavior. Acceptable values are "onMouseOver",
"onMouseOut", "onLoad", and "onClick".
eventIndex An integer value that specifies the location where the behavior should be
added, starting with
0 (although, to specify the end location, pass –1 here).
Returns
Nothing.
Description
Adds a specified behavior to the selected Hotspots and slices.
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 132. 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.