Adobe Extending Flash Professional CS5 Manuale Utente Pagina 132

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 565
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 131
110
EXTENDING FLASH PROFESSIONAL
Document object
Last updated 5/2/2011
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 (also origin point or zero 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]])
Parameters
startIndex An integer that is an index of first character to get. This parameter is optional.
endIndex An integer that is an index of last character to get. This parameter is optional.
Returns
A string that contains the selected text.
Vedere la pagina 131
1 2 ... 127 128 129 130 131 132 133 134 135 136 137 ... 564 565

Commenti su questo manuale

Nessun commento