Element object
155
Parameters
name
A string that specifies the name to associate with the data. This name is used to retrieve
the data.
type
A string that defines the type of the data. The allowable values are
"integer"
,
"integerArray"
,
"double"
,
"doubleArray"
,
"string"
, and
"byteArray"
.
value
Specifies the value to associate with the object. The data type of
value
depends on the
value of the
type
parameter. The specified value should be appropriate to the data type specified
by the
type
parameter.
Returns
Nothing.
Description
Method; stores data with an element. The data is available when the FLA file containing the
element is reopened. Only symbols and bitmaps support persistent data.
Example
See
element.getPersistentData()
.
element.top
Availability
Flash MX 2004.
Usage
element.top
Description
Read-only property; top side of the element. The value of
element.top
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 shows 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("Top (before) = " + sel.top);
fl.getDocumentDOM().moveSelectionBy({x:0, y:100});
fl.trace("Top (after) = " + sel.top);
See the
element.elementType
example.
Содержание FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Страница 1: ...Flash JavaScript Dictionary ...
Страница 16: ...16 Contents ...
Страница 40: ...40 Chapter 2 Top level functions ...
Страница 368: ...368 Chapter 3 Objects ...
Страница 386: ...386 Chapter 4 C Level Extensibility ...