beautypg.com

Document.getelementtextattr() – Adobe Extending Flash Professional CS5 User Manual

Page 128

background image

106

EXTENDING FLASH PROFESSIONAL

Document object

Last updated 5/2/2011

Usage

document.getElementProperty(propertyName)

Parameters

propertyName

A string that specifies the name of the Element property for which to retrieve the value.

Returns
The value of the specified property. Returns

null

if the property is an indeterminate state, as when multiple elements

are selected with different property values. Returns

undefined

if the property is not a valid property of the selected

element.

Description
Method; gets the specified

Element

property for the current selection. For a list of acceptable values, see the Property

summary table for the

Element object

.

Example
The following example gets the

name

of the Element property for the current selection:

// elementName = the instance name of the selected object.

var elementName = fl.getDocumentDOM().getElementProperty("name");

See also

document.setElementProperty()

document.getElementTextAttr()

Availability
Flash MX 2004.

Usage

document.getElementTextAttr(attrName [, startIndex [, endIndex]])

Parameters

attrName

A string that specifies the name of the

TextAttrs

property to be returned. For a list of property names and

expected values, see the Property summary table for the

TextAttrs object

.

startIndex

An integer that specifies the index of first character, with 0 (zero) specifying the first position. This

parameter is optional.

endIndex

An integer that specifies the index of last character. This parameter is optional.

This manual is related to the following products: