# \[mx2004\] limiting a rewind call on the timeline

**URL:** https://forum.kirupa.com/t/mx2004-limiting-a-rewind-call-on-the-timeline/208188
**Category:** flash
**Created:** [November 26, 2006, 2:58am UTC](https://forum.kirupa.com/t/mx2004-limiting-a-rewind-call-on-the-timeline/208188 "2006-11-26T02:58:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dalewb](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dalewb/32/3029_2.png) [@dalewb](https://forum.kirupa.com/u/dalewb)
#### Post date: [November 26, 2006, 2:58am UTC](https://forum.kirupa.com/t/mx2004-limiting-a-rewind-call-on-the-timeline/208188/1 "2006-11-26T02:58:40Z")

</div>

I am using the following code to perform a rewind on the timeline when a button is pressed:  
\*\* On the REWIND button:\*\*

```auto
on(release){
    rewState = true;
}
onClipEvent(load) {
    rewFrames = 1;
}

onClipEvent(enterFrame) {
    
    if(rewState) {
        _root.emptyMCcontainer.gotoAndStop(_root.emptyMCcontainer._currentframe - rewFrames);
    } else {
        stop();
    }    
}

```

**On the PLAY button:**  
on (release) {  
\_root.emptyMCcontainer.play();  
\_root.emptyMCcontainer.rewind\_mc.rewState = false;  
}

emptyMCcontainer is the current movie this is taking place in  
rewind\_mc is the rewind button

My question is, can I limit the rewind feature to just 12 frames at a time? Right now it rewinds back to the beginning, totally skipping all the stop(); commands on the timeline. I’ve tried for, do, and while loops in various places (one nearly froze my computer up!) with no luck. I’m pretty sure this is a simple thing, but I can’t figure it out.

update:  
I’ve added the following to the code so the user can at least stop the rewinding:

```auto
on(rollOver){
    rewState = true;
}
on(rollOut){
    rewState = false;
}

```

but the thing moves forward in 12frame intervals. It is wierd having it move in reverse freely like this. So I am still looking for a way to get it to move the timeline backwards in 12 frame intervals…
