var tf:TextField = new TextField();
var tfFormat:TextFormat = new TextFormat();
tfFormat.size = 25;
tf.defaultTextFormat = tfFormat;
tf.text = "hiiii";
addChild(tf);
That works fine… For 10 minutes though I had it like this and it wasn’t working:
var tf:TextField = new TextField();
tf.text = "hiiii";
var tfFormat:TextFormat = new TextFormat();
tfFormat.size = 25;
tf.defaultTextFormat = tfFormat;
addChild(tf);
Notice all I did was swap the tf.text placement. How in the heck is it not working in the second example? I mean am I just losing my noggin or what? Even in the adobe examples they have it set up like this. They have the text defined before the TextFormat just as I do in the second example. Unbelievable! lol Maybe flash has a bug?