ActionScript provides three different tools for applying text formatting: the flash.text.TextFormat class, HTML, and the flash.text.StyleSheet class. All three tools offer control over the following paragraph and character formatting options, but use different syntax:
Alignment, indentation, bullets, leading (line spacing, pronounced "led-ing"), tab stops
Font face, font size, font weight (bold or normal), font color, font style (italic or normal), kerning, letter spacing (tracking), text underline, hypertext links
Paragraph-level formatting applies to entire paragraphs, where a
paragraph is defined as a span of text delimited by line breaks
<P>). By contrast, character-level
formatting applies to arbitrary spans of individual characters,
delimited using text indices or HTML or XML tags.
The TextFormat class offers detailed programmatic control over text formatting and is typically used when generating textual output dynamically. The StyleSheet class helps separate formatting instructions from formatted content and is typically used when formatting large bodies of HTML or XML content. HTML formatting instructions offer a simple, intuitive way to format text, but pollute text content with formatting markup. HTML is typically used when convenience is more important than flexibility, as might be the case when formatting text in an application prototype or when formatting short runs of text that are ...