User Guide

74 Chapter 2: The Fireworks Object Model
Working with specific properties for selected elements
Some elements have specific properties that can be returned and set in addition to those that can
be set for selected objects (see Working with properties for any selected object” on page 73).
These specific properties are available for each of the following elements when the elements
are selected.
Hotspot
shape
urlText
altText
targetText
contour
behaviors (returns an array of behaviors)
color
To return the
alt tag that has been applied to the currently selected Hotspot, type the
following code:
altTag = fw.selection[0].altText;
SliceHotspot
SliceHotspot is a subclass of Hotspot. A slice has all Hotspot properties, plus the
following properties:
baseName
htmlText
tdTagText
sliceKind ("image" or "empty")
exportOptions
sliceID (read-only)
To return the name of the currently selected slice, type the following code:
sliceName = fw.selection[0].baseName;
Path
pathAttributes
Note: For the complete list of path attributes properties, see “pathAttributes” on page 76.
randSeed
textureOffset
contours
To return the value of the fill color for the currently selected path, type the following code:
fillColor = fw.selection[0].pathAttributes.fillColor