MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference page 660

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Usage 3:
my_textField.getTextFormat(beginIndex:Number,endIndex:Number)
Returns a TextFormat object containing formatting information for the span of text from
to
beginIndex
endIndex
specified range is set in the resulting TextFormat object. Any property that is mixed (it has
different values at different points in the range) has its value set to null.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
beginIndex:Number
not specify
beginIndex
TextField.
[optional] - An integer that specifies the end position of a span of text. If
endIndex:Number
you specify
beginIndex
single character specified by
Returns
- An object.
TextFormat
Example
The following ActionScript traces all of the formatting information for a text field that is
created at runtime.
this.createTextField("dyn_txt", this.getNextHighestDepth(), 0, 0, 100,
200);
dyn_txt.text = "Frank";
dyn_txt.setTextFormat(new TextFormat());
var my_fmt:TextFormat = dyn_txt.getTextFormat();
for (var prop in my_fmt) {
trace(prop+": "+my_fmt[prop]);
}
See also
getNewTextFormat (TextField.getNewTextFormat method)
(TextField.setNewTextFormat method)
method)
660
ActionScript classes
. Only properties that are common to all of the text in the
[optional] - An integer that specifies a character in a string. If you do
and
, the TextFormat object returned is for the entire
endIndex
but do not specify
.
beginIndex
, the TextFormat returned is for the
endIndex
,
setTextFormat (TextField.setTextFormat
,
setNewTextFormat

Advertisement

Table of Contents
loading

Table of Contents