Working with Text and HTML in Flash (Page 1 of 6 )
About Text in Flash
There are three types of text in Flash: static, dynamic and input.
Statictext is the text whose contents and appearance you determine when you author the Flash document.
Dynamic text fields are the fields whose contents can be updates dynamically at runtime.
Input text fields allow users to enter text into it at runtime.
Just like movie clips and buttons, you can also specify instance names to the dynamic and input text fields to control those using ActionScript. All dynamic and input text fields in a SWF file are instances of the TextField class. So, by specifying the instance name to a text field, you can use the methods and properties of the TextField class to manipulate it with ActionScript. However, unlike with movie clips, you cannot write ActionScript code inside a text instance, because text instances do not have Timelines.
Apart from the TextField class, there is one more class for text -- the TextFormat class. You can use the ActionScript TextFormat class to set the formatting properties of a text field. The TextFormat class incorporates character and paragraph formatting information. Character formatting information describes the appearance of individual characters: font name, point size, color, and an associated URL. Paragraph formatting information describes the appearance of a paragraph: left margin, right margin, indentation of the first line, and left, right, or center alignment.
Using ActionScript you can set, change, and format the text field and its content with the methods and properties of TextField and TextFormat classes. The methods of the TextField class let you set, select, and manipulate text in a dynamic or input text field that you create during authoring or at runtime.
You can also assign HTML formatted text directly to a text field. In Flash Player 7 and later, HTML text that you assign to a text field can contain embedded media such as movie clips, SWF files, and JPEG files. The text wraps around the embedded media in the same way that a Web browser wraps text around media embedded in an HTML document.