Working with selected objects
95
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 93
). 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;
Summary of Contents for FIREWORKS 8-EXTENDING FIREWORKS
Page 1: ...Extending Fireworks ...
Page 4: ...4 Contents ...
Page 358: ...358 Fireworks JavaScript API ...
Page 372: ...372 Index ...