# Preloader with speed of download

**URL:** <https://forum.kirupa.com/t/preloader-with-speed-of-download/21764>\
**Category:** Uncategorized\
**Created:** [May 26, 2003, 5:18am UTC](https://forum.kirupa.com/t/preloader-with-speed-of-download/21764 "2003-05-26T05:18:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultramarc](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@ultramarc](https://forum.kirupa.com/u/ultramarc)\
**Post date:** [May 26, 2003, 5:18am UTC](https://forum.kirupa.com/t/preloader-with-speed-of-download/21764/1 "2003-05-26T05:18:26Z")

</div>

i came across this page.

[http://www.eagames.com/official/thesimsonline/landing/index.jsp](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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2003, 7:00am UTC](https://forum.kirupa.com/t/preloader-with-speed-of-download/21764/2 "2003-05-26T07:00:36Z")

</div>

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]
