688 Chapter 12: ActionScript Dictionary
Example
The following code displays a font list returned by getFontList().
font_array = TextField.getFontList();
for( i in font_array){
trace(font_array[i]);
}
TextField.getNewTextFormat()
Availability
Flash Player 6.
Usage
my_txt.getNewTextFormat()
Parameters
None.
Returns
A TextFormat object.
Description
Method; returns a TextFormat object containing a copy of the text field’s text format object. The
text format object is the format that newly inserted text, such as text inserted with the
replaceSel() method or text entered by a user, receives. When getNewTextFormat() is
invoked, the TextFormat object returned has all of its properties defined. No property is
null.
TextField.getTextFormat()
Availability
Flash Player 6.
Usage
my_txt.getTextFormat()
my_txt.getTextFormat(index)
my_txt.getTextFormat(beginIndex, endIndex)
Parameters
index
An integer that specifies a character in a string.
beginIndex, endIndex Integers that specify the starting and ending locations of a span of text
within
my_txt.
Returns
An object.