94
Chapter 3: 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 299
. See
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.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()
.
Содержание 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 ...