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 27. Text Display and Input > Text Field Input - Pg. 755

Tweaking the FlashType Renderer The attractiveness and legibility of text is highly subjective. ActionScript offers a vari- ety of advanced tools for fine-tuning the specific behavior of the FlashType renderer. While a complete discussion of the FlashType renderer's optional settings is beyond the scope of this book, for the sake of familiarity, Table 27-9 lists the available tools and their basic purpose. For further study, see each item's entry in Adobe's Action- Script Language Reference. Table 27-9. Variables and methods used to set FlashType options Variable or method TextField's instance variable sharpness TextField's instance variable thickness Description Sets the sharpness of the text field's text to an integer value between­400 (blurry) and 400 (sharp). Sets the thickness of the lines in a text field's text to an inte- ger value between­200 (thin) and 200 (thick). Setting a text field's thickness to a high value gives a bold appearance to its text. Sets pixel-level grid-fitting options that affect the legibility of text at different alignments (left, center, and right). Grid fit- ting is a technique that positions the stems of a displayed glyph on whole pixels to improve its readability. Instructs FlashType's antialiasing algorithm to favor either LCD or CRT screens. This setting applies globally to all text rendered by the FlashType renderer. Sets the quality level of adaptively sampled distance fields (part of FlashType's internal structure for describing glyph outlines). This setting applies globally to all text rendered by the FlashType renderer (but Flash Player automatically increases this setting for any individual glyph rendered at a font size over 64 pixels). Higher values reduce performance. Assigns values that precisely determine the weight and sharpness of a specific font at a specific size, style, and color type ("light" or "dark"). TextField's instance variable gridFitType TextRenderer's static variable displayMode TextRenderer's static variable maxLevel TextRenderer's static method setAdvancedAntiAliasingTable( ) Now let's change our focus from formatting and fonts to receiving input through text fields. Text Field Input Text fields can receive a variety of forms of user input, including text entry, text selection, hypertext-link activation, keyboard focus, scrolling, and mouse interac- tion. In this section, we'll study text entry, text selection, and hypertext links. For information on keyboard focus, scrolling, and mouse interaction, see Chapter 22. Text Field Input | 755