MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 450

Extending flash
Table of Contents

Advertisement

Parameters
A string that specifies the name of the TextAttrs object property to change.
attrName
The value for the TextAttrs object property.
attrValue
For a list of possible values for
TextAttrs object" on page 456
An integer that is the index (zero-based) of the first character in the array. This
startIndex
parameter is optional.
An integer that specifies the index of the end point in the selected text string,
endIndex
which starts at
startIndex
is optional.
Returns
Nothing.
Description
Method; sets the attribute specified by the
identified by
startIndex
can be used to change attributes of text that might span TextRun elements (see
object), or that are portions of existing TextRun elements. Using it may change the position
and number of TextRun elements within this object's
).
text.textRuns
If you omit the optional parameters, the method uses the entire text object's character range.
If you specify only
startIndex
both
and
startIndex
not include, the character located at
Example
The following example sets the selected text field to italic:
fl.getDocumentDOM().selection[0].setTextAttr("italic", true);
The following example sets the size of the third character to 10:
fl.getDocumentDOM().selection[0].setTextAttr("size", 10, 2);
The following example sets the color to red for the third through the eighth character of the
selected text:
fl.getDocumentDOM().selection[0].setTextAttr("fillColor", 0xff0000, 2, 8);
450
Objects
attrName
.
and goes up to, but does not include,
attrName
and
to the value specified by
endIndex
, the range is a single character at that position. If you specify
, the range starts from
endIndex
endIndex
and
, see
"Property summary for the
attrValue
parameter associated with the text
text.textRuns
startIndex
.
. This parameter
endIndex
. This method
attrValue
TextRun
array (see
and goes up to, but does

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents