Packagecom.adobe.flashpro
Classpublic class Element
InheritanceElement Inheritance com.adobe.csawlib.CSHostObject
Subclasses Instance, Shape, Text

Everything that appears on the Stage is of the type Element.



Public Properties
 PropertyDefined By
  depth : int
[read-only] has a value >= 0 for the depth (ala arrange) of the object in the view.
Element
  elementType : String
[read-only] Type of element.
Element
  height : Number
Height of the Element.
Element
  layer : Object
[read-only] the value of the layer property is the layer object the element is on.
Element
  left : Number
[read-only] Left side of Element.
Element
  locked : Boolean
True if the Element is locked, false otherwise.
Element
  matrix : Object
the matrix has properties a, b, c, d, tx, and ty.
Element
  name : String
Name of Element, normally referred to as the Instance name.
Element
  rotation : Number
rotation of symbols, drawing objects, primitives and texts
Element
  scaleX : Number
x scale of symbols, drawing object, primitive
Element
  scaleY : Number
y scale of symbols, drawing object, primitive
Element
  selected : Boolean
get/set the selection state of the element
Element
  skewX : Number
x skew value of symbols, drawing object, primitive
Element
  skewY : Number
y skew of symbols, drawing object, primitive
Element
  top : Number
[read-only] Top side of Element.
Element
  transformX : Object
x position of symbols, drawing object, primitive transform point
Element
  transformY : Object
y position of symbols, drawing object, primitive transform point
Element
  width : Number
Width of the Element.
Element
  x : Number
x position of symbol's registration point
Element
  y : Number
y position of symbol's registration point
Element
Public Methods
 MethodDefined By
  
addFilter(filterName:String):void
Add a filter to the element.
Element
  
getFilters():Array
Return the array of filter objects for the element.
Element
  
getPersistentData(name:String):Object
Returns the value of the specified data.
Element
  
A point object containing the floating-point number properties x and y.
Element
  
hasPersistentData(name:String):Boolean
Returns true if data with the specified name has been attached to the object, false otherwise.
Element
  
remove all the filters on the element
Element
  
removeFilter(index:int):void
Remove the filter at the specified index in the filter list of the elemetn.
Element
  
removePersistentData(name:String):void
Removes any persistent data that has been attached to the object with the given name.
Element
  
setFilters(filters:Object):Boolean
Set the array of filter objects applied to the element.
Element
  
setPersistentData(name:String, type:String, value:Object):void
Stores data with an object.
Element
  
setTransformationPoint(transformationPoint:Object):void
setter for the symbol transformation point
Element
Property Detail
depthproperty
depth:int  [read-only]

has a value >= 0 for the depth (ala arrange) of the object in the view. The drawing order of objects on the stage. Specifies which one is on top of the others.


Implementation
    public function get depth():int
elementTypeproperty 
elementType:String  [read-only]

Type of element. Acceptable values are: "shape", "text", "tlfText", "instance" , "shapeObj". NOTE: A "shapeObj" is created with an extensible tool.


Implementation
    public function get elementType():String
heightproperty 
height:Number

Height of the Element.


Implementation
    public function get height():Number
    public function set height(value:Number):void
layerproperty 
layer:Object  [read-only]

the value of the layer property is the layer object the element is on.


Implementation
    public function get layer():Object
leftproperty 
left:Number  [read-only]

Left side of Element.


Implementation
    public function get left():Number
lockedproperty 
locked:Boolean

True if the Element is locked, false otherwise. If type is shape, locked is ignored.


Implementation
    public function get locked():Boolean
    public function set locked(value:Boolean):void
matrixproperty 
matrix:Object

the matrix has properties a, b, c, d, tx, and ty. a, b, c, d are floating point, tx, and ty are coordinates.


Implementation
    public function get matrix():Object
    public function set matrix(value:Object):void
nameproperty 
name:String

Name of Element, normally referred to as the Instance name. If type is shape, name is ignored.


Implementation
    public function get name():String
    public function set name(value:String):void
rotationproperty 
rotation:Number

rotation of symbols, drawing objects, primitives and texts


Implementation
    public function get rotation():Number
    public function set rotation(value:Number):void
scaleXproperty 
scaleX:Number

x scale of symbols, drawing object, primitive


Implementation
    public function get scaleX():Number
    public function set scaleX(value:Number):void
scaleYproperty 
scaleY:Number

y scale of symbols, drawing object, primitive


Implementation
    public function get scaleY():Number
    public function set scaleY(value:Number):void
selectedproperty 
selected:Boolean

get/set the selection state of the element


Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
skewXproperty 
skewX:Number

x skew value of symbols, drawing object, primitive


Implementation
    public function get skewX():Number
    public function set skewX(value:Number):void
skewYproperty 
skewY:Number

y skew of symbols, drawing object, primitive


Implementation
    public function get skewY():Number
    public function set skewY(value:Number):void
topproperty 
top:Number  [read-only]

Top side of Element.


Implementation
    public function get top():Number
transformXproperty 
transformX:Object

x position of symbols, drawing object, primitive transform point


Implementation
    public function get transformX():Object
    public function set transformX(value:Object):void
transformYproperty 
transformY:Object

y position of symbols, drawing object, primitive transform point


Implementation
    public function get transformY():Object
    public function set transformY(value:Object):void
widthproperty 
width:Number

Width of the Element.


Implementation
    public function get width():Number
    public function set width(value:Number):void
xproperty 
x:Number

x position of symbol's registration point


Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number

y position of symbol's registration point


Implementation
    public function get y():Number
    public function set y(value:Number):void
Method Detail
addFilter()method
public function addFilter(filterName:String):void

Add a filter to the element.

Parameters

filterName:String — (String) "glowFilter", "dropShadowFilter", "blurFilter", "bevelFilter", "gradientBevelFilter", "gradientGlowFilter", "adjustColorFilter"

getFilters()method 
public function getFilters():Array

Return the array of filter objects for the element.

Returns
Array
getPersistentData()method 
public function getPersistentData(name:String):Object

Returns the value of the specified data. The type returned depends on the type of data that was stored.

Parameters

name:String — (String) The name of the data to be returned. If no data with that name has been stored with the element undefined is returned.

Returns
Object
getTransformationPoint()method 
public function getTransformationPoint():Object

A point object containing the floating-point number properties x and y. Specifies the position of the transformation point within the element's own coordinate system. For symbols, it is relative to the registration point. For text fields, relative to the upper left corner. For drawing objects, primitives, and groups, relative to the center of the element.

Returns
Object
hasPersistentData()method 
public function hasPersistentData(name:String):Boolean

Returns true if data with the specified name has been attached to the object, false otherwise.

Parameters

name:String — (String) the name of the data item to test for.

Returns
Boolean
removeAllFilters()method 
public function removeAllFilters():void

remove all the filters on the element

removeFilter()method 
public function removeFilter(index:int):void

Remove the filter at the specified index in the filter list of the elemetn.

Parameters

index:int — (int) Index of the filter in the filter list

removePersistentData()method 
public function removePersistentData(name:String):void

Removes any persistent data that has been attached to the object with the given name.

Parameters

name:String — (String) the name of the data to remove.

setFilters()method 
public function setFilters(filters:Object):Boolean

Set the array of filter objects applied to the element.

Parameters

filters:Object — (Object) array of filter objects

Returns
Boolean
setPersistentData()method 
public function setPersistentData(name:String, type:String, value:Object):void

Stores data with an object. Data is written to .fla file and available to JavaScript when the file is re-opened.

Parameters

name:String — (String) The name to associate with the data. This name is used to retrieve the data.
 
type:String — (String) this argument defines the type of data. allowable types are "integer", "integerArray", "double", "doubleArray", "string", and "byteArray".
 
value:Object — (Object) the value depends on the value of argument 2. The logical rules apply.

setTransformationPoint()method 
public function setTransformationPoint(transformationPoint:Object):void

setter for the symbol transformation point

Parameters

transformationPoint:Object — (Object) A point object containing the floating-point number properties x and y. Specifies the position of the transformation point within the element's own coordinate system. For symbols, it is relative to the registration point. For text fields, relative to the upper left corner. For drawing objects, primitives, and groups, relative to the center of the element.