adaykin
08-17-2008, 01:30 AM
Hey, I am trying to setup a basic progress bar that moves from 1 to 100%, and reflects that in a label too. However my label moves from 1 to 100 without reflecting any of the numbers in between.
private function runBar():void
{
setTimeout(moveBar, 2000);
}
private function moveBar():void
{
var i:int;
for(i = 0; i <= 100; i++)
{
progressBar.setProgress(i, 100);
progressBar.label= "CurrentProgress" + " " + i + "%";
trace(i);
}
runBar();
}
private function runBar():void
{
setTimeout(moveBar, 2000);
}
private function moveBar():void
{
var i:int;
for(i = 0; i <= 100; i++)
{
progressBar.setProgress(i, 100);
progressBar.label= "CurrentProgress" + " " + i + "%";
trace(i);
}
runBar();
}