Preloading external text file (i only see progress after it is loaded)

Hi

I am loading external text file in flash and i am trying to trace progress so i could use it to show user how far loading is completed.

And i have i problem as i only get my trace after my text is completly loaded and shown in flash. only than i see progress in my trace window. Do you have any idea why? I am using one frame on one layer i have text field that i need for my text and another layer with code

stop();

var textName:String = "test.txt";

var textLoader:URLLoader = new URLLoader();
var textRequest:URLRequest = new URLRequest(textName);

textLoader.load(textRequest);

textLoader.addEventListener(ProgressEvent.PROGRESS, showProgress);

function showProgress(event:Event):void
{
trace(Math.round(textLoader.bytesLoaded / textLoader.bytesTotal * 100) + " %");
}

textLoader.addEventListener(Event.COMPLETE, loadFinished);

function loadFinished(e:Event):void
{
	textBox.text = textLoader.data;
}

Do you have aniy idea why do i only see my progress after i see text( so after it is complety loaded)?

have a nice day…

Luka