11
EXTENDING FIREWORKS
The Fireworks Object Model
Las
t
up
d
a
ted
12/8/2009
Working with specific properties for selected elements
Some elements have specific properties that can be returned in addition to those that can be returned for any selected
object (for more information, see “
Working with properties for any selected object
” on page 10). 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 98.
•
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
Group
•
elements
•
groupType