# First loop 1 sec, next loop 10 sec, have code

**URL:** <https://forum.kirupa.com/t/first-loop-1-sec-next-loop-10-sec-have-code/181006>\
**Category:** flash\
**Created:** [March 5, 2006, 4:01pm UTC](https://forum.kirupa.com/t/first-loop-1-sec-next-loop-10-sec-have-code/181006 "2006-03-05T16:01:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kurdix](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@Kurdix](https://forum.kirupa.com/u/Kurdix)\
**Post date:** [March 5, 2006, 4:01pm UTC](https://forum.kirupa.com/t/first-loop-1-sec-next-loop-10-sec-have-code/181006/1 "2006-03-05T16:01:58Z")

</div>

I have this code in the last frame

```auto
stop();
var loop = true;
var timer = setInterval(makeLoop, 10000);
function makeLoop()
{
  if(loop)
  {
  loop = false;
  clearInterval(timer);
  Play();
  }
}

```

How can i put something in the first frame, so that the first loop take 1 sec, and then the code above will kick in instead of the code in the first frame?  
btw, im a newbie.

[COLOR=red]EDIT:[/COLOR]  
[COLOR=black]i know that i can create a varible in the first frame like:[/COLOR]

```auto

If (xx) {
} else {
make first loop 1 sec
xx = true;
}

```
