TextFormatting in ActionScript 3 (setTextFormat)

The setTextFormat() method in actionScript 2 used to set the font properties to the text fields.


where in the above coding setTextFormat() method sets color, font type and size to the text field.

But in ActionScript 3 setTextFormat() method is no longer exists to set text formats to the Text Field (both dynamic text field and static text field). So ActionScript 3 we are going to set text formats to the text Fields using TextFormat Class. In this tutorial we are going to use both Text Field Class and TextFormat Class to set font type, font color, position and the font size.

Here is the example code……..

In ActionScript 3 defaultTextFormat sets text format to the text Field.


setTextFormat In ActionScript 3

Posted by:


Related articles

Back to Top