# Score as time?

**URL:** <https://forum.kirupa.com/t/score-as-time/261343>\
**Category:** programming\
**Created:** [May 26, 2008, 6:29pm UTC](https://forum.kirupa.com/t/score-as-time/261343 "2008-05-26T18:29:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amymation](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Amymation](https://forum.kirupa.com/u/Amymation)\
**Post date:** [May 26, 2008, 6:29pm UTC](https://forum.kirupa.com/t/score-as-time/261343/1 "2008-05-26T18:29:09Z")

</div>

Hi,  
Im making a game which has a score of time, the thing is im newish at AS and I was wondering if anyone can help me make a score variable which is time?

ALSO this game will have a scoreboard from mochiads and I can’t use textfields?

PLEASE HELP

---

<div class="post-metadata">

**Author:** ![onion](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/onion/32/3349_2.png) [@onion](https://forum.kirupa.com/u/onion)\
**Post date:** [May 26, 2008, 8:14pm UTC](https://forum.kirupa.com/t/score-as-time/261343/2 "2008-05-26T20:14:04Z")

</div>

So you want to increase the score every second eh?

Use “Intervals”, which call a function every second (or every half second… or quarter… actually you specify the time in milliseconds so it could be however many you want).

So how about this:

```auto

increaseScore = function(){
   score += 10
}

scoreTimer = setInterval(increaseScore,1000)

```

The above code will call the function “increaseScore” every second.
