How to Change the size Font in a Text Field on AS3

How to Change the size Font in a Text Field Component on AS3

Use the TextFormat class and apply size property

//declare format
var format:TextFormat = new TextFormat();
//set format size
format.size = 16;


if text is empty It will not work
as there is no text in the box to format.
so you have to apply setTextFormat propery on TextField object when there is a text on the box

insideText.text = “Your text goes here.”

//apply your format to insideText

insideText.setTextFormat(format);

Leave a Reply

Your email address will not be published. Required fields are marked *