PDA

View Full Version : Custom progressbar problem, can you read ?



humbucker
March 27th, 2009, 01:21 PM
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 !!

rondog
March 27th, 2009, 08:14 PM
did you ctrl+enter/cmd twice? Of course your data will load right away since I am assuming you are testing locally.

Elementss
March 28th, 2009, 09:20 AM
also...you can chage the tests download speed to see how it will load with diferent tipe of users...

when u test movie...Click:

View >>Download Setitngs

chose a speed then ..

View >> Simulate download

or as the post above me says Ctrl+Enter again :)