Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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.