246
USING FLASH CS4 PROFESSIONAL
Text
Font outlines and names
For static text, Flash creates outlines of the font and embeds them in the SWF file. Flash Player then uses the outlines
to display the text.
For dynamic or input text, Flash stores the font names; Flash Player then locates identical or similar fonts on the user’s
system when the Flash application is displayed. To ensure that users have the correct fonts for dynamic or input text,
you can embed font outlines, but this can increase file size.
Not all fonts displayed in Flash can be exported as outlines with a Flash application. To verify that a font can be
exported, use the View
> Preview Mode
> Antialias Text command to preview the text; jagged type indicates that Flash
does not recognize that font’s outline and will not export the text.
Device fonts
Use generic device fonts as an alternative to embedding font outline information. Flash includes three generic device
fonts, _sans (similar to Helvetica or Arial), _serif (similar to Times Roman), and _typewriter (similar to Courier).
When you specify one of these fonts and then export the document, Flash Player uses the font on the user’s computer
that most closely resembles the generic device font.
Because device fonts are not embedded, they result in a smaller SWF file. They can also result in more legible text at
small point sizes (below 10 points). However, if a user’s computer does not have an installed font corresponding to the
device font, text may look different than expected.
See also
“
Create and edit text fields
” on page 248
“
Use device fonts
” on page 257
Masking device fonts
You can use a movie clip to mask device font text in another movie clip. (You cannot mask device fonts by using a
mask layer on the Stage.) For this movie clip mask to function, the user must have Flash Player 6 (6.0.40.0) from Adobe
or later.
When you use a movie clip to mask device font text, Flash uses the rectangular bounding box of the mask as the
masking shape. That is, if you create a nonrectangular movie clip mask for device font text in the Flash authoring
environment, the mask that appears in the SWF file takes the shape of the rectangular bounding box of the mask, not
the shape of the mask itself.
For more information on using a movie clip as a mask, see Using movie clips as masks in
Learning ActionScript 2.0 in
Adobe Flash
.
For a sample of device font masking, see the Flash Samples web page at
www.adobe.com/go/learn_fl_samples
.
Download and decompress the Samples zip file and navigate to the Masking\DeviceFontMasking folder to access the
sample.
Creating text
About text fields
You can create three types of text fields: static, dynamic, and input. All text fields support Unicode.
•
Static text fields display text that doesn’t change characters dynamically.
Updated 5 March 2009