See also
,
TextFormat
setNewTextFormat (TextField.setNewTextFormat method)
sharpness (TextField.sharpness property)
public sharpness : Number
The sharpness of the glyph edges in this TextField instance. This property applies only if the
property of the text field is set to
antiAliasType
number from -400 to 400. If you attempt to set
Flash sets the property to the nearest value in the range (either -400 or 400).
Availability: ActionScript 1.0; Flash Player 8
Example
This example creates three text fields with
you have a font embedded in the Library with the linkage identifier set 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, 400, 100);
my_text1.text = "This text has sharpness set to 400."
my_text1.embedFonts = true;
my_text1.antiAliasType = "advanced";
my_text1.gridFitType = "pixel";
my_text1.sharpness = 400;
my_text1.setTextFormat(my_format);
var my_text2:TextField = this.createTextField("my_text2",
this.getNextHighestDepth(), 10, 40, 400, 100);
my_text2.text = "This text has sharpness set to 0."
1210
ActionScript classes
. The range for
"advanced"
to a value outside that range,
sharpness
set to
sharpness
400
sharpness
,
, and
. It assumes that
0
-400
"Times-12"
is a
. To
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?