User Guide

64 Chapter 2: The Fireworks Object Model
HTML export objects
Fireworks provides several object types that support the output of HTML and sliced images from
Fireworks. These objects let you write JavaScript scripts that create templates to output the type
of HTML that suits your specific requirement (generic HTML, Dreamweaver-compatible
HTML, and so on). For each HTML template, use a Slices.htt file that generates the HTML for
that particular template. For more information, see the Slices.htt and Metafile.htt files that are
installed with Fireworks.
Note: For information on how to format nonstandard data types, such as rectangle or point, see
“Formatting nonstandard data types” on page 11.
BehaviorInfo object
The BehaviorInfo object describes a behavior that is assigned to an element. There are seven
behaviors: Status Message, Swap Image, Button Down, Swap Image Restore, Button Highlight,
Button Restore, and Popup Menu (new in Fireworks 4). The following table lists the properties of
the BehaviorInfo object, along with their data types and, where appropriate, acceptable values and
notes. All BehaviorInfo object properties are read-only.
Property (read-only) Data type Notes
action
integer Specifies the type of behavior: 1 is Status
Message
, 2 is Swap Image, 4 is Button Down,
5 is
Swap Image Restore, 6 is Button
Highlight
, 7 is Button Restore, and 9 is
Popup Menu. In the standard (default)
templates, the following values are defined:
var kActionStatusMessage = 1;
var kActionSwapImage = 2;
var kActionButtonDown = 4;
var kActionSwapImageRestore = 5;
var kActionButtonHighlight = 6;
var kActionButtonRestore = 7;
var kActionPopupMenu = 9;
downHighlight
Boolean For button highlight behaviors, set to true if
there is a down highlight image.
event
integer Specifies the type of event: 0 is Mouse Over,
1 is
On Click, 2 is Mouse Out, and 3 is On
Load
. In the standard (default) templates, the
following values are defined:
var kEventMouseOver = 0;
var kEventOnClick = 1;
var kEventMouseOut = 2;
var kEventOnLoad=3;
hasHref
Boolean For swap-image behaviors, set to true if the
an external file is swapped in. The value
of
hasHref is always the opposite of
hasTargetFrame; you cannot swap from
two sources.
hasStatusText
Boolean For status message behaviors, true if the
status text is not empty.