# setTimeout & mouseMove

**URL:** <https://forum.kirupa.com/t/settimeout-mousemove/252138>\
**Category:** flash\
**Created:** [February 16, 2008, 4:37pm UTC](https://forum.kirupa.com/t/settimeout-mousemove/252138 "2008-02-16T16:37:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrock](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@adrock](https://forum.kirupa.com/u/adrock)\
**Post date:** [February 16, 2008, 4:37pm UTC](https://forum.kirupa.com/t/settimeout-mousemove/252138/1 "2008-02-16T16:37:42Z")

</div>

I made a quick scrolling banner for a friend. There are buttons scrolling by in a loop and I was just trying to make the loop stop when the mouse rolled over a button to read, or push it.

I tried setInterval first, and now setTimeout. My problem is, the length of time is not consistent. When the .swf first starts, it takes a 5 second break, and starts scrolling again. After stopping it again and again with a mouse movement, it eventually becomes a much shorter pause than 5 seconds.

Any ideas?

```auto
onClipEvent (mouseMove) {
    stop();
    setTimeout(please, 5500);
    function please(){
        play();
        updateAfterEvent;
    }
}

```
