Custom progressbar problem, can you read?

Hello Everyone,

I’m using a class driven swf that per example loads external other swf in it.
I wanted to add a progressbar that would show during the loading process.

I’m using this :


private function loadInProgress(event:ProgressEvent):void 
{
var percent:Number = (event.bytesLoaded / event.bytesTotal) * 100; 
var percentInt = String(int(percent)); // and display it as an integer
progressBar.height = ((percent * stage.stageHeight ) /100); 
trace(progressBar.height);
 }

My problem is that if I trace my progressBar.height, it’s only 0 and then 100…
seems sad for a loader bar.

Where am I wrong ??

Thank you !!