O'Reilly logo

Adobe® Flash® CS3 Professional Bible by Snow Dowd, Robert Reinhardt

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 31. Applying HTML and Text Field Formatting

IN THIS CHAPTER

  • Using HTML tags in text fields

  • Creating URL links within Flash text

  • Controlling text fields with the TextFormat object

  • Accessing functions within HTML tags

  • Rendering text with the FlashType engine

  • Scrolling text fields on a pixel-by-pixel basis

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

Tip

Because Flash Player 8 and higher support PNG, GIF, and progressive JPEG image support, you can load these file types into HTML-enabled Flash text fields as well. Flash Player 8 and higher 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 have been using Flash CS3, you may have noticed the HTML button in the Property inspector for text fields. Even though one of the primary advantages of using Flash movies is that you can avoid the fuss 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 ...

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