O'Reilly logo

Essential ActionScript 3.0 by Colin Moock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 27. Text Display and Input

Flash Player offers an extensive, sophisticated API for working with text. In this chapter we'll look at some of its key features: creating and displaying text, formatting text, and handling text input.

The information presented in this chapter applies specifically to Flash Player (both the browser add-on and standalone versions) but is also generally applicable to any Flash runtime that supports full-featured text display and input, such as Adobe AIR. Note, however, that unlike Flash Player, Adobe AIR provides full-featured HTML and CSS support, analogous to that found in web browsers such as Microsoft Internet Explorer and Mozilla Firefox. When working with other Flash runtimes, be sure to consult the appropriate documentation for information on text support.

The centerpiece of Flash Player's text API is the TextField class, which provides control over text displayed on screen.

Tip

In this book (and in most ActionScript documentation), the term "text field," refers, in a general sense, to a given text field on screen and its corresponding ActionScript TextField instance. Meanwhile, the phrase "a TextField object" refers more specifically to the ActionScript object that controls a text field.

Before we start creating and working with text, let's take a quick look at the core classes in Flash Player's text API, listed in Table 27-1. The text API's feature set can be broken into the following general categories:

  • Controlling on-screen text

  • Formatting text ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required