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). These specific properties are available for each of the following elements when the elements are selected.
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 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;
pathAttributes
Note: For the complete list of path attributes properties, see pathAttributes.
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
elements
groupType
To return the number of objects in a selected group, type the following code:
numOfObjectsinGroup = fw.selection[0].elements.length;
symbolID
transformMode
instanceType
urlText
altText
targetText
To return the instanceType for the currently selected instance, type the following code:
instance = fw.selection[0].instanceType;
antiAliased
antiAliasMode
autoKern
orientation
pathAttributes
Note: For the complete list of pathAttributes properties, see pathAttributes.
randSeed
textRuns
textureOffset
transformMode
To return the antiAliasMode setting for the currently selected text block, type the following code:
antiAliasedSetting = fw.selection[0].antiAliasMode;
Roundness
pathAttributes
Note: For the complete list of path attributes properties, see pathAttributes.
originalSides
transform
To return the roundness setting for the currently selected rectangle, type the following code:
roundness = fw.selection[0].roundness;
Several objects have the pathAttributes property. The following list is the valid set of pathAttributes subproperties that can be returned or set:
brushColor
fillColor
brush
fill
brushTexture
fillTexture
fillHandle1
fillHandle2
fillHandle3
brushPlacement
fillOnTop
To return the name of brush on the current path, type the following code:
brush = fw.selection[0].pathAttributes.brush.name;
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_02_71.htm