Chapter 30. Applying HTML and Text Field Formatting

In this chapter, we show you how to control text field formatting and focus by using internal HTML tags and ActionScript 3.0. Flash gives you an incredible amount of control over text field formatting when you use the TextFormat class with TextField objects (that is, input and dynamic text fields). We also show you how to highlight text within text fields by using the Selection class.

Tip

Because the Flash Player supports PNG, GIF, and progressive JPEG image, you can load these file types into HTML-enabled Flash text fields as well. Flash movies can also use the FlashType text rendering engine, which improves the readability of text at small point sizes.

Exploring HTML Usage in Text Fields

As you use Flash CS4, you may notice the HTML button in the Character section of the Properties panel for text fields. Even though one of the primary advantages of using Flash movies is that you can avoid the fuss and often unpredictable nature of HTML page layout, you can use HTML formatting tags within input and dynamic text fields. You can use <font> tags to specify multiple typefaces, colors, styles, and sizes within one text field. You can also use <a href> tags to link to internal ActionScript ...

Get Adobe® Flash® CS4 Professional Bible 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.