# AS Preloader question

**URL:** <https://forum.kirupa.com/t/as-preloader-question/183249>\
**Category:** flash\
**Created:** [March 25, 2006, 1:06am UTC](https://forum.kirupa.com/t/as-preloader-question/183249 "2006-03-25T01:06:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![quandary23](https://avatars.discourse-cdn.com/v4/letter/q/f04885/32.png) [@quandary23](https://forum.kirupa.com/u/quandary23)\
**Post date:** [March 25, 2006, 1:06am UTC](https://forum.kirupa.com/t/as-preloader-question/183249/1 "2006-03-25T01:06:21Z")

</div>

I know how to make a preloader count up from 0000 to 2006 using the timeline, but would like to know if there’s an easier way using actionscript.

Not terribly thrilled at the thought of population 2006 frames :puzzle:

thanks!

---

<div class="post-metadata">

**Author:** ![v2ikematu](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@v2ikematu](https://forum.kirupa.com/u/v2ikematu)\
**Post date:** [March 25, 2006, 1:17am UTC](https://forum.kirupa.com/t/as-preloader-question/183249/2 "2006-03-25T01:17:14Z")

</div>

```auto

var nTotal:Number = this.getBytesTotal();
var nLoaded:Number = this.getBytesLoaded();
var nYearCount:Number = Math.round(nLoaded/nTotal*2006);

```

simple math 😉

---

<div class="post-metadata">

**Author:** ![quandary23](https://avatars.discourse-cdn.com/v4/letter/q/f04885/32.png) [@quandary23](https://forum.kirupa.com/u/quandary23)\
**Post date:** [March 25, 2006, 1:31am UTC](https://forum.kirupa.com/t/as-preloader-question/183249/3 "2006-03-25T01:31:16Z")

</div>

thanks for the quick reply v2!  
i’m an unabashed math simpleton 🙂  
apparently still an as simpleton as well - where in a preload script would i add that?  
thanks!

---

<div class="post-metadata">

**Author:** ![v2ikematu](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@v2ikematu](https://forum.kirupa.com/u/v2ikematu)\
**Post date:** [March 25, 2006, 9:29am UTC](https://forum.kirupa.com/t/as-preloader-question/183249/4 "2006-03-25T09:29:54Z")

</div>

gimme your code… I really don’t know what kind of code are you using to display your preloader and.so.on 😃
