MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 117

Extending flash
Table of Contents

Advertisement

Parameters
An integer that is an index of first character to get. This parameter is optional.
startIndex
An integer that is an index of last character to get. This parameter is optional.
endIndex
Returns
A string that contains the selected text.
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
is passed, the string starting at that index and ending at the end
startIndex
of the field is returned. If
and
are passed, the string starting from
startIndex
endIndex
up to, but not including,
is returned.
startIndex
endIndex
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.
Document object
117

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents