1170
ActionScript classes
antiAliasType (TextField.antiAliasType property)
public antiAliasType : String
The type of anti-aliasing used for this TextField instance. Advanced anti-aliasing is available
only in Flash Player 8 and later. You can control this setting only if the font is embedded (with
the
embedFonts
property set to
true
). For Flash Player 8, the default setting is
"advanced"
.
To set values for this property, use the following string values:
Availability:
ActionScript 1.0; Flash Player 8
Example
This example creates two text fields and applies advanced anti-aliasing to the first one only. It
assumes that you have a font embedded in the Library with the linkage identifier set to
"Times-12"
. To embed the font, follow these steps:
■
Open your Library
■
Click the Library options menu in the upper right corner of the Library
■
Select "New Font" from the dropdown list
■
Name the font "Times-12"
■
Select "Times New Roman" from the font dropdown list
■
Press the "OK" button
■
Right-click on the newly created font and select "Linkage..."
■
Check the "Export for ActionScript" box
■
Accept the default identifier "Times-12" by pressing the "OK" button
var my_format:TextFormat = new TextFormat();
my_format.font = "Times-12";
var my_text1:TextField = this.createTextField("my_text1",
this.getNextHighestDepth(), 10, 10, 300, 30);
my_text1.text = "This text uses advanced anti-aliasing.";
my_text1.antiAliasType = "advanced";
my_text1.border = true;
String value
Description
"normal"
Applies the regular text anti-aliasing. This matches the type of anti-
aliasing that Flash Player used in version 7 and earlier.
"advanced"
Applies advanced anti-aliasing, which makes text more legible. (This
feature is available as of Flash Player 8.) Advanced anti-aliasing
allows for high-quality rendering of font faces at small sizes. It is best
used with applications that have a lot of small text. Advanced anti-
aliasing is not recommended for fonts that are larger than 48 points.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...