# Mouse clicks and page flips

**URL:** <https://forum.kirupa.com/t/mouse-clicks-and-page-flips/287343>\
**Category:** Uncategorized\
**Created:** [April 29, 2009, 5:53pm UTC](https://forum.kirupa.com/t/mouse-clicks-and-page-flips/287343 "2009-04-29T17:53:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![becca2anne0](https://avatars.discourse-cdn.com/v4/letter/b/13edae/32.png) [@becca2anne0](https://forum.kirupa.com/u/becca2anne0)\
**Post date:** [April 29, 2009, 5:53pm UTC](https://forum.kirupa.com/t/mouse-clicks-and-page-flips/287343/1 "2009-04-29T17:53:58Z")

</div>

I am doing an animation using a parigrafika’s page flip code. I have different pages being autoflipped at different speeds:

Main timeline:

```auto

     var intervalID:Number
var intervalID2:Number
var intervalID3:Number

function pageOneAutoFlip (sec) {

    if(sec==undefined) sec = 2000;    
    intervalID = setInterval(nextPage,sec*5000);

}
function page10AutoFlip (sec) {
    clearInterval(intervalID);
    clearInterval(intervalID3);
    if(sec==undefined) sec = 70000;    
    intervalID2 = setInterval(nextPage,sec*70000);
}

function partsPagesAutoFlip (sec) {
    clearInterval(intervalID2);
    clearInterval(intervalID3);
    if(sec==undefined) sec = 1000;    
    intervalID3= setInterval(nextPage,sec*500);

}

function stopAutoFlip () {
    clearInterval(intervalID);
    clearInterval(intervalID2);
    clearInterval(intervalID3);
} 

```

Inside individual Pages 0,2, and 10:

```auto

     if (_root.getPN(10)==_root.page) {
        _root.page10AutoFlip(1);
    } else {
    }
    
onMouseUp = function() {
    _root.stopAutoFlip();} 

```

What I need to happen is if the user has ever clicked the mouse during the animation, don’t run the code on the individual pages. How I have it now, it still executes when it gets to page 1,2, or 10. Any ideas?!
