Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


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

Chapter 10. Working with Text Fields > Formatting Text Fields

Formatting Text Fields

Formatting text fields with ActionScript can be a complex task. Each text field created with ActionScript must be formatted to address font face, font size, alignment, kerning, and so on. Having to do this for multiple text fields that will be styled the same way creates a lot of repetitive code. The TextFormat class helps you format text fields without all the redundant code.

The TextFormat class has one method (the TextFormat() constructor) and a list of properties specifically for formatting text fields. Once a TextFormat object has been created and its properties are set, the object can be applied to the defaultTextFormat and/or setTextFormat property of a text field(s). TextFormat objects are the ActionScript equivalent of style sheets to a certain degree.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint