Element object

Element is an abstract or base class; nothing of class Element ever exists. However, it is useful for simplifying the other class descriptions. Read-only properties are marked with a bullet (•).

Property Data type Notes

blendMode

string

Acceptable values are "normal", "multiply", "screen", "darken", "lighten",  "difference", "hue", "saturation", "color", "luminosity", "invert", "tint", and "erase".

customData

struct

Assign any objects (array, integer, string, and so on).

effectList

object

EffectList object (for more information, see EffectList object).

height

float

Read-only in the base class; other properties or API calls are used to resize specific types of elements.

isSmartShape

Boolean

Confirms whether the element is an Auto Shape.

left

float

Can round to an integer.

mask

object

ElementMask object (for more information, see ElementMask object). Returns null if the element has no element mask.

name

string

Can be null (removes any existing name).

opacity

float

Acceptable values, 0 to 100, represent percent opacity.

rawLeft

float

Leftmost space occupied by the pixels (not the left location of the bounding box).

rawTop

float

Top space occupied by the pixels (not the top location of the bounding box).>

top

float

Can round to an integer.

pixelRect

rect

Rectangle of the area occupied by the pixels. For example, the pixelRect of a text object is smaller than what the property inspector reports, since the actual pixels are inside the bounding box.

visible

Boolean

If set to false, the element is hidden. The default value is true.

width

float

Read-only in the base class; other properties or API calls are used to resize specific types of elements.

The following table lists the methods of the Element object, along with their parameters.

Method Parameter Definition

generateSmartShapeCode

root

The root parameter is a string value that is prefixed to each line of output.

Group object

Group is a subclass of the base class Element and contains the following properties in addition to those in Element (for more information, see Element object).

Property Data type Notes

controlPoints

array

Array of control points defined for the Auto Shape object.

elements

array

Array of Element objects in the group (for more information, see Element object).

groupType

string

Acceptable value is "normal". ("mask to image" and "mask to path" were deprecated in Fireworks MX.)

smartShapeCode

string

The body of code in the JavaScript file that defines the Auto Shape object.

transformMode

string

Can be one of the following: "AlwaysTransform" If the Auto Shape is transformed in any way (scale, skew, rotate) the transformation matrix is modified.

"DontTransformUniformScale"  If the Auto Shape is scaled in uniformly, the actual points are moved; otherwise, the transformation matrix is modified.

"DontTransformAnyScale"  If the Auto Shape is scaled (even nonuniformly), the actual points are moved; otherwise, the transformation matrix is modified.

The following table lists the methods of the Group object, along with their parameters.

Method Parameter Definition

generateSmartShapeCode()

string

Generates JavaScript code for creating an Auto Shape. You can specify a string to prefix each line of output.

globalToSmartShapeCoords()

point

Changes an object to the new coordinates after an Auto Shape is transformed (scaled, skewed, or rotated) so that the Auto Shape object contains the new location.

RegisterForEvent()

string

Call this to receive notification of the string specifying a Fireworks event. smartShape.operation will be the name of the event triggered.

Returns the total number of events registered after adding the specified event.

removeTransformation()

none

Undoes the previous transformation.

smartShapeToGlobalCoords()

point

Converts a transformed (scaled, skewed, or rotated) SmartShape object's space into global space. (For more information, see globalToSmartShapeCoords() above.)

unRegisterAllEvents()

none

Call this to stop receiving notification of all previously registered events.

UnRegisterForEvent()

string

Call this to stop receiving notification of a single previously registered event.


 

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_33.htm