document.setTextString()
Availability
Flash MX 2004.
Usage
document.setTextString( text [, startIndex [, endIndex]] )
Parameters
A string of the characters to insert in the text field.
text
An integer that specifies first character to replace. The first character position is 0
startIndex
(zero). This parameter is optional.
An integer that specifies the last character to replace. The first character position is 0
endIndex
(zero). This parameter is optional.
Returns
A Boolean value:
Description
Method; inserts a string of text. If the optional parameters are not passed, the existing text
selection is replaced; if the text object isn't currently being edited, the whole text string is replaced.
If only
startIndex
are passed, the string passed replaces the segment of text starting from
endIndex
to, but not including,
Example
The following example replaces the current text selection with "Hello World":
var success = fl.getDocumentDOM().setTextString("Hello World!");
The following example inserts "hello" at position 6 of the current text selection:
var pass = fl.getDocumentDOM().setTextString("hello", 6);
The following example inserts "Howdy" starting at position 2 and up to, but not including,
position 7 of the current text selection:
var ok = fl.getDocumentDOM().setTextString("Howdy", 2, 7);
document.setTransformationPoint()
Availability
Flash MX 2004.
Usage
document.setTransformationPoint( transformationPoint )
if the text of at least one text string is set;
true
is passed, the string passed is inserted at this position. If
. See
endIndex
document.getTextString()
otherwise.
false
startIndex
startIndex
.
Document object
and
up
125
Need help?
Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?