116
Objects
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. For information
on the format of the return value, see
document.addNewRectangle()
.
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 edit mode, the registration point of the symbol being edited.
Example
The following example gets the bounding rectangle for the current selection and then displays
its properties:
var newRect = fl.getDocumentDOM().getSelectionRect();
var outputStr = "left: " + newRect.left + " top: " + newRect.top + " right:
" + newRect.right + " bottom: " + newRect.bottom;
alert(outputStr);
See also
document.selection
,
document.setSelectionRect()
document.getTextString()
Availability
Flash MX 2004.
Usage
document.getTextString( [
startIndex
[,
endIndex
]] )
Содержание FLASH 8-EXTENDING FLASH
Страница 1: ...Extending Flash...
Страница 38: ...38 Top Level Functions and Methods...
Страница 532: ...532 Objects...
Страница 554: ...554 C Level Extensibility...