162
Objects
document.setTextSelection()
Availability
Flash MX 2004.
Usage
document.setTextSelection(
startIndex, endIndex
)
Parameters
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).
Returns
A Boolean value:
true
if the method can successfully set the text selection;
false
otherwise.
Description
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.
Example
The following example selects the text from the 6th character through the 25th character:
fl.document.setTextSelection(5, 25);
document.setTextString()
Availability
Flash MX 2004.
Usage
document.setTextString(
text
[,
startIndex
[,
endIndex
]] )
Parameters
text
A string of the characters to insert in the text field.
startIndex
An integer that specifies first character to replace. The first character position is
0 (zero). This parameter is optional.
endIndex
An integer that specifies the last character to replace. The first character position
is 0 (zero). This parameter is optional.
Содержание FLASH 8-EXTENDING FLASH
Страница 1: ...Extending Flash...
Страница 38: ...38 Top Level Functions and Methods...
Страница 532: ...532 Objects...
Страница 554: ...554 C Level Extensibility...