hi...
i have been searching google and yahoo for hours on this one with no success grrr
i have an .fla, which loads goes to different frames in the timeline according to the download speed of the user. i understand how it should work... start timer > upload file > stop timer > calculate download speed - easy?
so what is this simple code im missing to find the download speed? from my fruitless searching, the only relevant code i could find, is this:
... but i have test this, which gives an undefined property error grrr.... so what is the actionscript 3, to find the value of the download speed?Code:var time1 = getTimer(); targetClip.loadMovie("example.swf"); targetClip.onLoad = function() { var time2 = getTimer(); var totalTime = (time2 - time1)/1000; var fileSize = targetClip.getBytesTotal(); var connectionSpeed = (fileSize/totalTime); // Bytes per second. Multiply by 8 to get bits per second. }
please help if you can
thanks




Reply With Quote
