MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 409

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

Setting anti-alias with ActionScript
Flash 8 offers two types of anti-aliasing: normal and advanced. Advanced anti-aliasing is
available only in Flash Player 8 and later, and can be used only if you embed the font in the
library and have the text field's
default setting for text fields created using ActionScript is
To set values for the
TextField.antiAliasType
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 for improved text readability, which is available in
Flash Player 8. Advanced anti-aliasing allows font faces to be rendered at very high quality at
small sizes. It is best used with applications that have a lot of small text.
Macromedia does not recommend advanced anti-aliasing for fonts larger than 48
points.
To use ActionScript to set anti-alias text, see the following example.
To use advanced anti-aliasing:
1.
Create a new Flash document and save it as antialiastype.fla.
2.
Create two movie clips on the Stage and give them instances names of normal_mc
and advanced_mc.
You will use these movie clips to toggle between the two types of anti-aliasing: normal
and advanced.
3.
Open the Library panel and select New Font from the pop-up menu in the upper-right
corner of the Library panel.
The Font Symbol Properties dialog box opens, in which you can select a font to embed in
the SWF file (including a font style and font size). You can also assign a font name that
appears in the document's library and in the Font drop-down menu in the Property
inspector (if you have a text field selected on the Stage).
a.
Select the Arial font from the Font drop-down menu.
b.
Make sure that the Bold and Italic options are not selected.
c.
Set the size to 10 pixels.
d.
Enter the font name of Arial-10 (embedded)
e.
Click OK.
4.
In the library, right-click the font symbol and select Linkage from the context menu.
The Linkage Properties dialog box appears.
property set to
embedFonts
property, use the following string values:
. For Flash Player 8, the
true
.
normal
.
About font rendering and anti-alias text
409

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents