Returns
If one text field is selected, the property is returned if there is only one value used within the text.
Returns
undefined
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
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
property of the character to the right of the index is returned, if all the selected text objects match
values. If
startIndex
characters from
startIndex
Description
Method; gets a specific
not text fields are ignored. For a list of property names and expected values, see
summary for the TextAttrs object" on page
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.getSelectionRect()
Availability
Flash MX 2004.
Usage
document.getSelectionRect()
Parameters
None.
Returns
The bounding rectangle of the current selection, or 0 if nothing is selected.
Description
Method; gets the bounding rectangle of the current selection. If a selection is non-rectangular, the
smallest rectangle encompassing the entire selection is returned. The rectangle is based on the
document space or, when in an edit mode, the registration point of the symbol being edited. See
document.setSelectionRect()
94
Chapter 3: Objects
if there are several values used inside the text field. If several text fields are
and
are passed, the value returned reflects the entire range of
endIndex
up to, but not including,
property of the selected text objects. Selected objects that are
TextAttrs
.
.
endIndex
299. See
document.setElementTextAttr()
undefined
is passed, the
startIndex
"Property
.
.
Need help?
Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?
Questions and answers