Chapter 10. Text

IN THIS CHAPTER

Creating Text Fields

Setting Text Field Attributes

Selecting Text

Formatting Text

Formatting with HTML and CSS

Triggering ActionScript from HTML Links

Loading HTML and CSS

Text Layout Framework

What’s Next?

Working with text can be a basic affair, such as displaying a simple text string in a default text field, or as complex as your needs require, perhaps creating individual text fields for every character in a string to build an animated text effect. Learning how to create and manipulate text objects at runtime with ActionScript can increase flexibility and make it much easier to reuse code from project to project.

In this chapter, we’ll focus mostly on how to display, populate, and format text data. We’ll discuss two kinds of text: the traditional Flash Platform text technology, available for many years and newly christened Classic text; and text created using the Text Layout Framework (TLF)—a significantly more robust text technology introduced with Flash Player 10. TLF offers improved typographical control, support for multiple columns, flowing text among multiple linked containers, and more.

We’ll cover:

  • Creating Text Fields. Text fields can be created with ActionScript like any display object, freeing you from the Flash Properties panel and allowing you to create fields on the fly.

  • Setting Text Field Characteristics. How you set up your text field will determine how the field will appear and function.

  • Selecting Text. You can select segments of text using ...

Get Learning ActionScript 3.0, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.