Document object
163
Returns
A Boolean value:
true
if the text of at least one text string is set;
false
otherwise.
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
is passed, the string passed is inserted at this position. If
startIndex
and
endIndex
are passed, the string passed replaces the segment of text starting
from
startIndex
up to, but not including,
endIndex
.
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);
See also
document.getTextString()
document.setTransformationPoint()
Availability
Flash MX 2004.
Usage
document.setTransformationPoint(
transformationPoint
)
Parameters
transformationPoint
A pair of floating-point numbers that specifies values for each of
the following elements:
■
Shapes:
transformationPoint
is set relative to document. 0,0 is the same as the Stage
(upper-left corner).
■
Symbols:
transformationPoint
is set relative to the symbol’s registration point. 0,0 is
located at the registration point.
Содержание FLASH 8-EXTENDING FLASH
Страница 1: ...Extending Flash...
Страница 38: ...38 Top Level Functions and Methods...
Страница 532: ...532 Objects...
Страница 554: ...554 C Level Extensibility...