Timer!

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


_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… :slight_smile:

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