I just spent 2 hours trying to figure out why my text was not showing up after I assigned a new text string to a textFiled. Basically, you must reassign the text format every time you reassign the text. Why?
var formatNormal:TextFormat = new TextFormat("Lucida Console",15,0xFFFFFF);
//formatNormal
var tf1:TextField = new TextField();
tf1.width = stage.stageWidth;
tf1.autoSize = TextFieldAutoSize.LEFT;
tf1.x = tf1.y = 0;
this.mcContentOnStage.addChild(tf1);
[COLOR=red]tf1.text = string1;
tf1.setTextFormat(formatNormal);[/COLOR] //Format must be set after text is assigned!!!!
function handleNext(evt:Event):void
{
clickCount++;
/******This switch statement handles populating the scrollpane each time the user clicks next.*****/
switch (clickCount)
{
case 1 :
[COLOR=red]tf1.text = string2;
[/COLOR] [COLOR=red]tf1.setTextFormat(formatNormal);[/COLOR]