User Guide
114 Objects
Returns
If one text field is selected, the property is returned if there is only one value used within the
text. Returns
undefined if there are several values used inside the text field. If several text
fields are selected, and all the text alignment values are equal, the method returns this value. If
several text fields are selected, but all the text alignment values are not equal, the method
returns
undefined. If the optional arguments are not passed, these rules apply to the range of
text currently selected or the whole text field if the text is not currently being edited. If only
startIndex is passed, the property of the character to the right of the index is returned, if all
the selected text objects match values. If
startIndex and endIndex are passed, the value
returned reflects the entire range of characters from
startIndex up to, but not including,
endIndex.
Description
Method; gets a specific TextAttrs property of the selected text objects. Selected objects that
are not text fields are ignored. For a list of property names and expected values, see “Property
summary for the TextAttrs object” on page 456. See also
document.setElementTextAttr().
Example
The following example gets the size of the selected text fields:
fl.getDocumentDOM().getElementTextAttr("size");
The following example gets the color of the character at index 3 in the selected text fields:
fl.getDocumentDOM().getElementTextAttr("fillColor", 3);
The following example gets the font name of the text from index 2 up to, but not including,
index 10 of the selected text fields:
fl.getDocumentDOM().getElementTextAttr("face", 2, 10);
document.getFilters()
Availability
Flash 8.
Usage
document.getFilters()
Parameters
None.
Returns
An array that contains a list of filters applied to the currently selected object(s).