Adobe Extending Flash Professional CS5 Manuale Utente Pagina 133

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 565
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 132
111
EXTENDING FLASH PROFESSIONAL
Document object
Last updated 5/2/2011
Description
Method; gets the currently selected text. If the optional parameters are not passed, the current text selection is used. If
text is not currently opened for editing, the whole text string is returned. If only startIndex is passed, the string starting
at that index and ending at the end of the field is returned. If startIndex and endIndex are passed, the string starting
from startIndex up to, but not including, endIndex is returned.
If there are several text fields selected, the concatenation of all the strings is returned.
Example
The following example gets the string in the selected text fields:
fl.getDocumentDOM().getTextString();
The following example gets the string at character index 5 in the selected text fields:
fl.getDocumentDOM().getTextString(5);
The following example gets the string from character index 2 up to, but not including, character index 10:
fl.getDocumentDOM().getTextString(2, 10);
See also
document.setTextString()
document.getTimeline()
Availability
Flash MX 2004.
Usage
document.getTimeline()
Parameters
None.
Returns
The current Timeline object.
Description
Method; retrieves the current Timeline object in the document. The current timeline can be the current scene, the
current symbol being edited, or the current screen.
Example
The following example gets the Timeline object and returns the number of frames in the longest layer:
var longestLayer = fl.getDocumentDOM().getTimeline().frameCount;
fl.trace("The longest layer has" + longestLayer + "frames");
The following example enters edit-in-place mode for the selected symbol on the Stage and inserts a frame on the
symbol’s timeline.
Vedere la pagina 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 564 565

Commenti su questo manuale

Nessun commento