166 Working with Text
Creating scrolling text
There are several ways to create scrolling text in Flash. You can easily make dynamic text fields
scrollable using menu commands or the text block handle.
You can also add a ScrollBar component to a text field to make it scroll. For more
information, see “UIScrollBar Component” in Components Language Reference.
If you want to use ActionScript, you can use the
scroll and maxscroll properties of the
TextField object to control vertical scrolling and the
hscroll and maxhscroll properties to
control horizontal scrolling in a text block. See “Example: Creating scrolling text” in Learning
ActionScript 2.0 in Flash.
To make a dynamic text block scrollable, do one of the following:
■ Shift-double-click the handle on the dynamic text block.
■ Select the dynamic text block with the Selection tool and select Text > Scrollable.
■ Select the dynamic text block with the Selection tool. Right-click (Windows) or Control-
click (Macintosh) the dynamic text block and select Text > Scrollable.
Setting 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.
You can optimize text to make it more readable at small sizes. See “About font outlines and
device fonts” on page 160.
For static text, font outlines are exported in a published SWF file. You can choose to use
device fonts instead of exporting font outlines (horizontal text only). See “About font outlines
and device fonts” on page 160.
For dynamic or input text, Flash stores the names of the fonts used in creating the text. Flash
Player uses the names to locate identical or similar fonts on the user’s system when the Flash
application is playing. You can also choose to 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. See “Setting dynamic and input text options” on page 183.
When text is selected, you use the Property inspector to change font and paragraph attributes,
and to direct Flash to use device fonts rather than embedding font outline information.