getFontList (TextField.getFontList method)
public static getFontList() : Array
Returns the names of fonts on the player's host system as an array. (This method does not
return names of all fonts in currently loaded SWF files.) The names are of type
method is a static method of the global TextField class. You cannot specify a text field instance
when you call this method.
Availability: ActionScript 1.0; Flash Player 6
Returns
- An array of font names.
Array
Example
The following code displays a font list returned by
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]);
}
getNewTextFormat (TextField.getNewTextFormat
method)
public getNewTextFormat() : TextFormat
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
method or text entered by a user, receives. When
replaceSel()
invoked, the TextFormat object returned has all of its properties defined. No property is
Availability: ActionScript 1.0; Flash Player 6
Returns
- A TextFormat object.
TextFormat
Example
The following example displays the specified text field's (
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160,
120);
var my_fmt:TextFormat = my_txt.getNewTextFormat();
1180
ActionScript classes
:
getFontList()
getNewTextFormat()
) text format object.
my_txt
. This
String
is
.
null
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?