# Can't stop rewinding

**URL:** https://forum.kirupa.com/t/cant-stop-rewinding/193527
**Category:** Uncategorized
**Created:** [July 13, 2006, 9:39pm UTC](https://forum.kirupa.com/t/cant-stop-rewinding/193527 "2006-07-13T21:39:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tealdric](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@tealdric](https://forum.kirupa.com/u/tealdric)
#### Post date: [July 13, 2006, 9:39pm UTC](https://forum.kirupa.com/t/cant-stop-rewinding/193527/1 "2006-07-13T21:39:13Z")

</div>

I’m using the Action Script posted below to instruction a button to rewind the root movie two frames at a time (and then stop when released). However, I need to find a way to make it automatically stop on the first frame. As it is, the function is rewinding into the previous scene…and nobody wants that. Any suggestions?

rewind\_btn.onPress = function() {  
\_root.createEmptyMovieClip(“controller\_mc”, 1);  
controller\_mc.onEnterFrame = function() {  
\_root.gotoAndStop(\_root.\_currentframe-2);  
};  
};  
rewind\_btn.onRelease = function() {  
controller\_mc.removeMovieClip();  
stop();  
};
