• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Presenting Data > Formatting Text

Formatting Text

Although Flash MX 2004 supports only a few HTML styles, you can do quite a lot with text colors, fonts, and even hyperlinks. In addition, Flash MX 2004 now supports most styles from Cascading Style Sheets (CSS). Finally, there’s also an under documented feature to make your hyperlinks trigger Flash functions. This chapter covers all of these.

Using HTML Text

To populate a dynamic or input text field, you just set that field’s text property as in fieldInstance_txt.text="some string". (Notice that to trigger the code-completion hints, I named the instance with the suffix "_txt" —that’s part of the name, not some property.) Confusingly, field instances have both a text and an htmlText property. To use htmlText, the field must have its html property set to true (either with code, fieldInstance_txt.html=true, or by physically clicking the Render as HTML option in the Properties panel as Figure 5.1 shows).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint