Extending Flash |
|
|
|
| Objects > Document object > document.setTextSelection() | |||
Flash MX 2004.
document.setTextSelection(startIndex, endIndex)
startIndex An integer that specifies the position of the first character to select. The first character position is 0 (zero).
endIndex An integer that specifies the end position of the selection up to, but not including, endIndex. The first character position is 0 (zero).
A Boolean value: true if the method can successfully set the text selection; false otherwise.
Method; sets the text selection of the currently selected text field to the values specified by the startIndex and endIndex values. Text editing is activated, if it isn't already.
The following example selects the text from the 6th character through the 25th character:
fl.document.setTextSelection(5, 25);
|
|
|
|