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

Chapter 6. Viewing and Entering Informat... > Styling with the TextFormat Class

Styling with the TextFormat Class

Earlier examples of the TextField class showed the TextFormat class in action. TextFormat has just one method, TF_fmt.getTextExtent(), which provides text string measurement information. Most of the properties of the TextFormat class are fairly self-explanatory, as shown in Table 6.10.

Table 6.10. TextFormat Properties
PROPERTYCHARACTERISTICS
TF_fmt.alignIndicates the alignment of a paragraph (left, center, or right).
TF_fmt.blockIndentThe point measurement of the indent of a text block. This sets how much the indent will be.
TF_fmt.boldA Boolean value for boldface setting. When this property is set to true, the text will be boldfaced.
TF_fmt.bulletA Boolean value for bullet font. When this property is set to true, the text will be in bullet format.
TF_fmt.colorThe format text color value, written as 0xrrggbb. Even through the property is called color, it's actually the text color.
TF_fmt.fontA string with a font name (for example, "Verdana"). Sets the font family for the text.
TF_fmt.indentThe number of points paragraph is indented. This is a number only, without a unit of measure.
TF_fmt.italicA Boolean value for italic setting. When this property is set to true, the text is italicized.
TF_fmt.leadingA vertical blank space between lines. Leading is a typesetting term left over from the old “hot type” days when different amounts of lead were added between lines for spacing.
TF_fmt.leftMarginThe number of points the left margin is from the side of the text field border. This property sets the entire text block.
TF_fmt.rightMarginThe number of points the right margin is from the side of the text field border.
TF_fmt.sizeThe font size in points. In the latest version of Flash, smaller text sizes are visible, but sizes smaller than 6 points may be difficult to read. (Even 6 points is difficult to read!)
TF_fmt.tabStopsThe number of points each tab stop moves (defaults to 4).
TF_fmt.targetThe target window in the page that the hyperlink addresses. The window can be a named window in a frameset or _blank, _parent, _top, or _self.
TF_fmt.underlineA Boolean value for underline setting. When this property is set to true, the text will be underlined.
TF_fmt.urlThe text link target URL. This works in a similar manner to the getURL() function.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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