Ok, I see, I usually use this code to keep the font size and don’t wrap the text to the next line, as for instance in lower thirds you want to keep the text on one line only:
private static function ScaleDownTextField(Input:String, Field:TextField, initialFieldWidth:int, initialFieldX:int, align:int):void
{
var wi:int = initialFieldWidth;
Field.autoSize = TextFieldAutoSize.LEFT;
Field.scaleX = 1;
Field.text = Input;
if (wi < Field.width)
{
Field.scaleX = wi / Field.width;
}
if (align == 0) //left
{
Field.x = initialFieldX;
}
if (align == 1) //center
{
Field.x = initialFieldX + (initialFieldWidth - Field.width) / 2;
}
if (align == 2) //right
{
Field.x = initialFieldX + initialFieldWidth - Field.width;
}
}
I also sometimes use a hyphenation library to fill a multi line textfield. That makes the text flow smoother. Good for longer paragraphs of text.