User Guide

TextField.getNewTextFormat() 727
TextField.getFontList()
Availability
Flash Player 6.
Usage
TextField.getFontList() : Array
Parameters
None.
Returns
An array.
Description
Method; a static method of the global Tex tFie ld cl as s. You dont specify a specific text field (such
as
my_txt) when you call this method. This method returns names of fonts on the player’s host
system as an array. (It does not return names of all fonts in currently loaded SWF files.) The
names are of type String.
Example
The following code displays a font list returned by getFontList():
var font_array:Array = TextField.getFontList();
font_array.sort();
trace("You have "+font_array.length+" fonts currently installed");
trace("--------------------------------------");
for (var i = 0; i<font_array.length; i++) {
trace("Font #"+(i+1)+":\t"+font_array[i]);
}
TextField.getNewTextFormat()
Availability
Flash Player 6.
Usage
my_txt.getNewTextFormat() : TextFormat
Parameters
None.
Returns
A TextFormat object.