• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 4. Using Type > Creating Text

Creating Text

You can include several kinds of text in your Macromedia Flash MX document. You can create static text for buttons or menu items, and you can create static text blocks where you just need the text to be within this specified area. You can also create input text boxes—for data entry forms, for example—and dynamic text boxes that import text from an external source such as stock quotes or daily news.


Text can be displayed horizontally with left-to-right flow, or vertically (for static text only) with left-to-right or right-to-left flow.

You can alter the point size, font, style, color, spacing, and alignment of your text. You can transform text just as you would with an object, by rotating, skewing, or scaling it. Text can also be broken apart and reshaped. You can hyperlink text to URLs. You can also embed fonts in your Flash document. Doing this ensures that end users will see exactly what you intended them to see, and you're no longer limited to the fonts someone may or may not have loaded on their computer. However, this technique adds to the final file size.

You can create a symbol from a font. This lets you export the font as part of a shared library and allows for the use of that font in other Flash MX documents.

You cannot spell-check text in Flash. In order to spell-check text, you need to copy and paste it into an external text-editor application.

To create text, select the text tool from the toolbar. To type static text, click on the stage and begin typing. To create a static-text box, click and then drag to the desired text-field length and width. The same holds true when creating a dynamic text box or an input text box. Once you've used the text tool to create your text on the stage, use the Properties panel (also called the Properties Inspector) to define what type of text field you would like. Within the Properties panel, you can determine all the other attributes of your text.

Although you can apply any attribute to alter static text, you cannot use certain attributes on dynamic text fields. Such attributes include kerning, character spacing, hyperlinking, rotation, and direction of text. With input fields, you have other options such as word wrap and text borders. You can apply instance names to dynamic text and input text fields, but not to static text.

In order to create scrollable text, you must use the dynamic text option and then give it an instance name. Once you do this, you can then attach the scroll bar component to this dynamic text field.

Flash displays a specific handle on the corner of the text field to identify what type of text field you are creating. For a list of text fields and their corresponding handles, see Table 4.1.

Type Attributes

You can determine the following attributes of text in the Properties panel (see Figure 4.1).

Figure 4.1. Use the Properties panel to alter text attributes.

Font attributes include the following:

  • Font family

  • Point size

  • Style (bold or italic)

  • Color

  • Character spacing

  • Character position

  • Kerning

  • Text type

  • Text direction

  • Device fonts

  • Borders

  • HTML

  • Selectability

  • URL link

  • x and y coordinates

  • Width and height

Paragraph attributes include the following:

  • Alignment

  • Indents

  • Margins

  • Line spacing

  • Format

You can set the font and paragraph attributes of text. Kerning is the spacing between letters or characters. Many fonts have built-in kerning information. For example, the space between an F and an I may be different from the space between an F and a T. In order to use the font's built-in kerning information, check the Auto Kern option in the Properties panel.

In order to manipulate any of these attributes, you must have the text selected first.

Embedded Fonts vs. Device Fonts

When using a font installed on your computer, Flash embeds the font information into the small Web format (SWF) file. This ensures that the font is displayed within the Flash Player 6 as you designed it in your authoring environment.

You also have the option of using special fonts called “device fonts” as a substitute for embedded fonts. There are three device fonts in Flash MX: _sans (similar to Arial or Helvetica), _serif (similar to Times Roman), and _typewriter (similar to Courier). Device fonts—which can be used for both static and dynamic text—are not embedded into your final Flash presentation. Instead, the fonts that most closely resemble the device fonts used in your movie are found on the end user's computer and used.


While using device fonts gives you a smaller file size, there is no guarantee how the text within the presentation will display on the end user's computer screen.

Dynamically Updating Text

You can update dynamic text fields through an external text file. This is extremely helpful for updating daily news and anything that may need to change on a daily basis. With dynamic text fields in place, you never have to open your Flash document again to update text. Your dynamic text field is scripted to read from an external text file. Your text file can be created using a text editor application such as Notepad (PC) or SimpleText (Macintosh).

To create a dynamic text field, select your text tool. Click and drag a text field onto your stage. Once the text field is drawn, make sure it is selected, then choose the Dynamic option from the Text Type drop-down menu option in the Properties panel. Like a movie clip, dynamic text can have an instance name. By naming this dynamic text field with an instance name, you can talk to it through ActionScript. You then need to place ActionScript code that will load data or variables (loadVariables) into this dynamic text field from your external text file.

→ For more details about this and other simple ActionScript techniques, see Chapter 9, “Introduction to ActionScript.”

Creating Font Symbols

You create a font symbol from the Library panel's option menu. Once this is done, you can use this font as a shared library item. Assign the font symbol an identifier string and a URL where the movie containing the font symbol will be located. This lets you link to this font without embedding it within your movie, thus shaving a few pounds off your final file size.

Linking Text to URLs

To link text to a URL, select the text to be linked. With the text selected, type the URL link to which you want the end user directed within the URL Link of the Properties panel. To create a link to an email address, simply use the mailto: prefix in front of your URL link, which in this case would be the specified email address. Thus it would read mailto:yourname@yourcompany.com within the URL Link.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint