Gettextformat (Textfield.gettextformat Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

trace("TextFormat has the following properties:");
for (var prop in my_fmt) {
trace(prop+": "+my_fmt[prop]);
}
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the

getTextFormat (TextField.getTextFormat method)

public getTextFormat([beginIndex:Number], [endIndex:Number]) : TextFormat
Returns a TextFormat object for a character, a range of characters, or an entire TextField
object.
The following table describes three possible usages:
Usage
my_textField.getTextForm
at()
my_textField.getTextForm
at(beginIndex:Number)
my_textField.getTextForm
at(beginIndex:Number,end
Index:Number)
Availability: ActionScript 1.0; Flash Player 6
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
MovieClip.getNextHighestDepth()
Description
Returns a TextFormat object containing formatting information
for all text in a text field. Only properties that are common to all
text in the text field are set in the resulting TextFormat object.
Any property that is mixed, meaning that it has different values at
different points in the text, has a value of
Returns a TextFormat object containing a copy of the text field's
text format at the
Returns a TextFormat object containing formatting information
for the span of text from
that are common to all of the text in the specified range are set in
the resulting TextFormat object. Any property that is mixed (that
is, has different values at different points in the range) has its
value set to
null
[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
method used in this example requires Flash Player
position.
beginIndex
to
beginIndex
.
, the TextFormat returned is for the
endIndex
method.
null.
. Only properties
endIndex
TextField
1181

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF