# Start Over after idle

**URL:** <https://forum.kirupa.com/t/start-over-after-idle/59266>\
**Category:** flash\
**Created:** [July 29, 2004, 6:52pm UTC](https://forum.kirupa.com/t/start-over-after-idle/59266 "2004-07-29T18:52:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cordoe](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@Cordoe](https://forum.kirupa.com/u/Cordoe)\
**Post date:** [July 29, 2004, 6:52pm UTC](https://forum.kirupa.com/t/start-over-after-idle/59266/1 "2004-07-29T18:52:04Z")

</div>

Hey,

I have looked all over, but I cannot find an example of this. I have a kiosk movie, and I want it to return to Frame 1 if no one uses it for a couple minutes. Does anyone have any idea how to do this? Your help would be appreciated.

Thanks.

Edit: AS MX

---

<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:** [July 29, 2004, 8:11pm UTC](https://forum.kirupa.com/t/start-over-after-idle/59266/2 "2004-07-29T20:11:28Z")

</div>

just have sumthing like

```auto
 
timer = 0;
function timing() {
 timer++;
 if (timer == 1800) {
  timer = 0;
  gotoAndPlay(1);
 }
}
if (timer=0) {
 timing();
}
 

```

off the top of my head, sorri i cant check it. im not at my house atm.

---

<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:** [July 29, 2004, 8:16pm UTC](https://forum.kirupa.com/t/start-over-after-idle/59266/3 "2004-07-29T20:16:44Z")

</div>

> [@Cordoe](#):
>
> Hey,
> 
> I have looked all over, but I cannot find an example of this. I have a kiosk movie, and I want it to return to Frame 1 if no one uses it for a couple minutes. Does anyone have any idea how to do this? Your help would be appreciated.
> 
> Thanks.
> 
> Edit: AS MX

I`m not sure what a kiosk movie is, but something like this might work

function init() {  
oldX = this.\_xmouse;  
oldY = this.\_ymouse;  
}  
init();  
function checkMousemove() {  
if (this.\_xmouse == oldX && this.\_ymouse == oldY) {  
clearInterval(myInterval);  
gotoAndStop(1);  
} else {  
oldX = this.\_xmouse;  
oldY = this.\_ymouse;  
//you might want to clearInterval here and put the setInterval in a startbutton press or something.  
}  
}

myinterval = setInterval(checkMousemove, 120000);
