Working with Text

You can include text in your Macromedia Flash Basic 8 and Flash Professional 8 applications in a variety of ways. You can create text blocks containing static text, text whose contents and appearance you determine when you author the document. You can also create dynamic or input text fields. Dynamic text fields display dynamically updating text, such as sports scores, stock quotes, or news headlines. Input text fields allow users to enter text for forms, surveys, or other purposes.

Just like movie clip instances, text field instances are ActionScript objects that have properties and methods. By giving a text field an instance name, you can manipulate it with ActionScript. However, unlike with movie clips, you cannot write ActionScript code inside a text instance, because text instances don't have Timelines.

You can orient text horizontally, with left-to-right flow, or vertically (static text only), with left-to-right or right-to-left flow. You can select the following attributes for text: font, point size, style, color, tracking, kerning, baseline shift, alignment, margins, indents, and line spacing. See Setting text attributes.

The Check Spelling feature lets you check spelling in text fields, as well as in scene and layer names, frame labels, ActionScript strings, and other places where text occurs in your document. See Checking spelling.

You can transform text as you would an object--rotating, scaling, skewing, and flipping it--and still edit its characters. See About transforming text. When you're working with horizontal text, you can link text blocks to URLs and make it selectable. See Linking text to a URL (horizontal text only).

Timeline effects let you apply prebuilt animation effects to text, such as bouncing, fading in or out, and exploding. See Using Timeline effects with text.

When you work with Flash FLA files, Flash substitutes fonts in the FLA file with other fonts installed on your system if the specified fonts are not on your system. You can select options to control which fonts are used in substitution. Substitute fonts are used for display on your system only. The font selection in the FLA file remains unchanged. See Substituting missing fonts.

Flash also lets you create a symbol from a font so that you can export the font as part of a shared library and use it in other Flash documents. See Creating font symbols.

You can break text apart and reshape its characters. For additional text-handling capabilities, you can manipulate text in FreeHand and import the FreeHand file into Flash, or export the file from FreeHand as a SWF file. See Breaking text apart.

Flash documents can use Type 1 PostScript fonts, TrueType, and bitmap fonts (Macintosh only). You can check spelling by copying text to the Clipboard using the Movie Explorer and pasting the text into an external text editor. See Using the Movie Explorer.

You can preserve rich text formatting in text fields, using HTML tags and attributes. See Preserving rich text formatting.

When you use HTML text for the content of a dynamic or input text field, you can flow the text around an image, including a SWF or JPG file or a movie clip. See Using HTML-formatted text in Learning ActionScript 2.0 in Flash.

You can use ActionScript to format input and dynamic text, and to create scrolling text fields. ActionScript has events for dynamic and input text fields that you can capture and use to trigger scripts. For information on using ActionScript to control text, see Working with Text and Strings in Learning ActionScript 2.0 in Flash.

For an interactive introduction to creating text in Flash, select Help > How Do > Basic Flash > Add Static, Input, and Dynamic Text.

This chapter contains the following sections:

About FlashType
About Unicode text encoding in Flash applications
About font outlines and device fonts
Creating text
Creating scrolling text
Setting text attributes
Creating font symbols
Editing text
Checking spelling
About transforming text
Using Timeline effects with text
Breaking text apart
Linking text to a URL (horizontal text only)
Preserving rich text formatting
Substituting missing fonts
Controlling text with ActionScript
Creating scrolling text

Version 8

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00000513.html