198
Objects
element.left
Availability
Flash MX 2004.
Usage
element.left
Description
Read-only property; a float value that represents the left side of the element. The value of
element.left
is relative to the upper left of the Stage for elements that are in a scene, and is
relative to the symbol’s registration point if the element is stored within a symbol.Use
document.setSelectionBounds()
or
document.moveSelectionBy()
to set this property.
Example
The following example illustrates how the value of this property changes when an element
is moved:
// Select an element on the Stage and then run this script.
var sel = fl.getDocumentDOM().selection[0];
fl.trace("Left (before) = " + sel.left);
fl.getDocumentDOM().moveSelectionBy({x:100, y:0});
fl.trace("Left (after) = " + sel.left);
See the
element.elementType
example.
element.locked
Availability
Flash MX 2004.
Usage
element.locked
Description
Property; a Boolean value:
true
if the element is locked;
false
otherwise. If the value of
element.elementType
is
"shape"
, this property is ignored.
Example
The following example locks the first element in the first frame, top layer:
// Similar to Modify > Arrange > Lock:
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].locked =
true;
Summary of Contents for FLASH 8-EXTENDING FLASH
Page 1: ...Extending Flash...
Page 38: ...38 Top Level Functions and Methods...
Page 532: ...532 Objects...
Page 554: ...554 C Level Extensibility...