PDA

View Full Version : Download speed?


Lui
01-15-2008, 10:10 PM
Is there some way you can detect how fast a computer is loading a flash file?

arkhan
01-16-2008, 04:21 AM
yes..you have a getTimer and bytesLoaded..so if you devide bytes loaded per second you have the bps..

Lui
01-16-2008, 05:50 PM
Care for a sample code?

arkhan
01-18-2008, 03:12 AM
var n:Number = 0;
var t:Number = 0;
tm = setInterval(timer,100);
function timer(){
n = getTimer();
t+= random(1000);
trace(t/n);
}


Only with bytesLoaded instead of a random number.