Setting text attributes



About text attributes

You can set the font and paragraph attributes of text. Font attributes include font family, point size, style, color, letter spacing, autokerning, and character position. Paragraph attributes include alignment, margins, indents, and line spacing.

For static text, font outlines are exported in a published SWF file. For horizontal static text, you can use device fonts instead of exporting font outlines.

For dynamic or input text, Flash stores the names of the fonts, and Flash Player locates identical or similar fonts on the user’s system. You can also embed font outlines in dynamic or input text fields. Embedding font outlines can increase file size, but it ensures that users have the correct font information.

When creating new text, Flash uses the text attributes that are currently set in the Property inspector. When you select existing text, use the Property inspector to change font or paragraph attributes, and to direct Flash to use device fonts rather than embedding font outline information.

Set a font, point size, style, and color

  1. Using the Selection tool , select one or more text fields on the Stage.
  2. In the Property inspector (Window > Properties), select a font from the Family pop‑up menu, or enter a font name.
    Note: The _sans, _serif, _typewriter, and device fonts can be used only with static horizontal text.
  3. Enter a value for the font size.

    Font size is set in points, regardless of the current ruler units.

  4. To apply bold or italic style, select the style from the Style menu.

    If the selected font does not include a bold or italic style, the style does not appear in the menu. You can select the Faux Bold or Faux Italic styles from the Text menu (Text > Style > Faux Bold or Faux Italic). Faux Bold and Faux Italic styles are added to the Regular style by the operating system. The faux styles may not look as good as fonts that include a true bold or italic style.

  5. Select a font rendering method from the Anti-Aliasing pop‑up menu (directly below the Color control) to optimize text.
  6. To select a fill color for text, click the Color control and do one of the following:
    • Select a color from the Color menu.

    • Type a color’s hexadecimal value in the box in the upper-left corner.

    • Click Color Picker  and select a color from the system color picker. (When setting the text color, use only solid colors, not gradients. To apply a gradient to text, break the text apart and convert the text to its component lines and fills.)

Set letter spacing, kerning, and character position

Letter spacing inserts a uniform amount of space between characters. Use letter spacing to adjust the spacing of selected characters or entire blocks of text.

Kerning controls the spacing between pairs of characters. Many fonts have built-in kerning information. For example, A and V are often closer together than A and D. Flash provides horizontal tracking and kerning (for horizontal text) and vertical tracking and kerning (for vertical text).

For vertical text, you can disable kerning by default in Flash Preferences. If you do this and leave the kerning option selected in the Property inspector, kerning is applied to horizontal text only.

  1. Using the Text tool , select one or more sentences, phrases, or text fields on the Stage.
  2. In the Property inspector (Window > Properties), set the following options:
    • To specify letter spacing (tracking and kerning), enter a value in the Letter Spacing field.

    • To use a font’s built-in kerning information, select Auto-Kern.

    • To specify superscript or subscript character position, click the Toggle Superscript or Toggle Subscript button. The default position is Normal. Normal places text on the baseline, Superscript places text above the baseline (horizontal text) or to the right of the baseline (vertical text), and Subscript places text below the baseline (horizontal text) or to the left of the baseline (vertical text).

Set alignment, margins, indents, and line spacing

Alignment determines the position of each line of text in a paragraph relative to edges of the text field. Horizontal text is aligned relative to the left and right edges of the text field, and vertical text is aligned relative to the top and bottom edges of the text field. Text can be aligned to one edge of the text field, centered in the text field, or aligned to both edges of the text field (full justification).

Margins determine the amount of space between the border of a text field and its text. Indents determine the distance between the margin of a paragraph and the beginning of the first line.

Line spacing determines the distance between adjacent lines in a paragraph. For vertical text, line spacing adjusts the space between vertical columns.

Work with horizontal text

  1. Using the Text tool , select one or more text fields on the Stage.
  2. In the Property inspector (Window > Properties), set the following options:
    • To set alignment, click Left, Center, Right, or Full Justification.

    • To set the left or right margin, enter values in the Margins text fields in the Paragraph section of the Property inspector.

    • To specify indents, enter a value in the Indentation text field in the Paragraph section of the Property inspector.

    • To specify line spacing, enter a value in the Line Spacing text field in the Paragraph section of the Property inspector.

Work with vertical text

  1. Using the Text tool , select one or more text fields on the Stage.
  2. In the Property inspector (Window > Properties), set the following options:
    • To set alignment, click Top, Center, Bottom, or Full Justification.

    • To set the top or bottom margin, enter values in the Margins fields in the Paragraph section of the Property inspector.

    • To specify indents, enter a value in the Indentation text field in the Paragraph section of the Property inspector.

    • To specify line spacing, enter a value in the Line Spacing text field in the Paragraph section of the Property inspector.

Work with text anti-aliasing

Flash provides improved font rasterization that lets you specify the anti-aliasing properties for fonts. The improved anti-aliasing capabilities are available only for SWF files published for Flash Player 8 or later. If you are publishing files for earlier versions of Flash Player, you can only use the Anti-Alias For Animation feature.

Apply anti-aliasing for each text field rather than each character. Also, when you open existing FLA files in Flash 8 or later, the text is not automatically updated to the advanced anti-aliasing options; you must select individual text fields and manually change the anti-aliasing settings.

When you open a FLA file created for use with Flash Player 7 or earlier, the text Property inspector sets the anti-alias option to its equivalent anti-aliasing option from Flash MX 2004. However, to use the advanced anti-aliasing features, you must upgrade the FLA content for Flash Player 8 or later.

Choose an anti-aliasing option for selected text

 In the Property inspector, choose one of the following options from the Anti-Aliasing pop‑up menu:
Use Device Fonts
Specifies that the SWF file use the fonts installed on the local computer to display the fonts. Typically, device fonts are legible at most font sizes. Although this option doesn’t increase the size of the SWF file, it forces you to rely on the fonts installed on the user’s computer for font display. When using device fonts, choose only commonly installed font families.

Bitmap Text (No Anti-Alias)
Turns off anti-aliasing and provides no text smoothing. The text is displayed using sharp edges, and the resulting SWF file size is increased because the font outlines are embedded in the file. Bitmap text is sharp at the exported size, but scales poorly.

Anti-Alias For Animation
Creates a smoother animation by ignoring alignment and kerning information. This option creates a larger SWF file because font outlines are embedded. For legibility, use 10-point or larger type when specifying this option.

Anti-Alias For Readability
Uses the Flash text rendering engine to improve the legibility of fonts, particularly at small sizes. This option creates a larger SWF file because font outlines are embedded. To use this option, you must publish to Flash Player 8 or later. (Do not use this option if you intend to animate text; instead, use Anti-Alias For Animation.)

Custom Anti-Alias
Lets you modify the font’s properties. Use Sharpness to specify the smoothness of the transition between the text edges and the background. Use Thickness to specify how thick the font anti-aliasing transition appears. (Larger values cause the characters to look thicker.) Specifying Custom Anti-Alias creates a larger SWF file because font outlines are embedded. To use this option, you must publish to Flash Player 8 or later.

Upgrade content for Flash 8 or later anti-aliasing

  1. Open a FLA file created for use with Flash Player 7 or earlier.
  2. In the Publish Settings dialog box (File > Publish Settings), select Flash Player 8 or Flash Player 9 from the Version pop‑up menu.
  3. Select the text field to apply the Anti-Alias For Readability or Custom Anti-Alias option to.
  4. In the Property inspector, select Anti-Alias For Readability or Custom Anti-Alias from the Font Rendering Method pop‑up menu.

Make text selectable

Static horizontal text or dynamic text can be selectable by users viewing your Flash application. (Input text is selectable by default.) After selecting text, the user can copy, cut, and then paste the text into a separate document.

  1. Using the Text tool , select the horizontal text that you want to make selectable.
  2. In the Property inspector (Window > Properties), select Static Text or Dynamic Text.
  3. Click Selectable .

Use device fonts

You can use generic device fonts in text.

  1. Using the Selection tool , select one or more text fields.
  2. In the Property inspector (Window > Properties), select Static Text from the pop‑up menu.
  3. In the Font pop‑up menu, select a device font:
    _sans
    A font similar to Helvetica or Arial.

    _serif
    A font similar to Times Roman.

    _typewriter
    A font similar to Courier.