# Timer!

**URL:** <https://forum.kirupa.com/t/timer/13892>\
**Category:** Uncategorized\
**Created:** [February 19, 2003, 3:34pm UTC](https://forum.kirupa.com/t/timer/13892 "2003-02-19T15:34:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gencoglu27](https://avatars.discourse-cdn.com/v4/letter/g/3e96dc/32.png) [@gencoglu27](https://forum.kirupa.com/u/gencoglu27)\
**Post date:** [February 19, 2003, 3:34pm UTC](https://forum.kirupa.com/t/timer/13892/1 "2003-02-19T15:34:53Z")

</div>

hi,  
could anyone give me one or two examples of how to use “time” in my clip…  
I mean…if the timer=5 let my movie play(\*1.wav) and if the timer= 10 let my movie play(\*2.wav) and so on…

* * *

or if timer=5 lt my “circle” go right and if timer=10 let my “circle” go down…and so on…

thanks

---

<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:** [February 19, 2003, 3:50pm UTC](https://forum.kirupa.com/t/timer/13892/2 "2003-02-19T15:50:02Z")

</div>

```php

_root.onLoad = function()
{
   tempTimer = 0; 
   playTimer = 0;
   framesPerSec = 20; //place your movie's fps here
}

_root.onEnterFrame = function()
{
   if(tempTimer < framesPerSec)
   {
      tempTimer++;
   }else{
      tempTimer = 0;
      playTimer++;
   }
}

```

Then… Just take test on the playTimer… if playTimer = 5 Then 5 seconds have elapsed while your movie has played… 🙂

---

<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:** [February 19, 2003, 4:09pm UTC](https://forum.kirupa.com/t/timer/13892/3 "2003-02-19T16:09:33Z")

</div>

You can also search the forum with the keyword getTimer or setInterval.
