TextFormatting in ActionScript 3 (setTextFormat)

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

example:

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.

txt_field.defaultTextFormat=txt_format;

setTextFormat In ActionScript 3

Posted by:

muni

Related articles

My Favorite Blog

Quiz Web App

Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap

Be Happy!!!

Inspirational Quotes - Motivational Quotes- Short Stories

Does God Exists?

Inspirational Quotes - Motivational Quotes- Short Stories

Back to Top