Preloader with speed of download

i came across this page.

http://www.eagames.com/official/thesimsonline/landing/index.jsp

the preloader shows the speed of the download (in kbps)

just curious how it was done.

anyone?

I guess it’s just a matter of dividing the KB loaded by the elapsed time. =)
[AS]var kb = Math.floor(this.getBytesLoaded()/1024);
var kbps = Math.ceil(kb/(getTimer()/1000));[/AS]