# Mouse events help!

**URL:** <https://forum.kirupa.com/t/mouse-events-help/258526>\
**Category:** flash\
**Created:** [April 24, 2008, 6:06pm UTC](https://forum.kirupa.com/t/mouse-events-help/258526 "2008-04-24T18:06:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![midnhtsun](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@midnhtsun](https://forum.kirupa.com/u/midnhtsun)\
**Post date:** [April 24, 2008, 6:06pm UTC](https://forum.kirupa.com/t/mouse-events-help/258526/1 "2008-04-24T18:06:05Z")

</div>

Hey all first post here so go easy :lol:

Alright my project is being made in flash cs3 with AS2.0

I have made a rewind button for a movie clip my only problem is if the user is pressing the mouse down and slides the mouse off the button(which is a movie clip) while still holding the mouse down the animation will keep rewinding. I would like it to stop on the current frame the second the mouse rolls out of the button(which is a movie clip).

below is the code I placed on the movie clip that is acting as my rewind button.

Thanks for any help and guidance!

on (press){  
var videoRW;  
videoRW = function(){  
if((this.\_parent.movie\_mc.\_currentframe - 1) \>= 0){  
this.\_parent.movie\_mc.gotoAndStop(this.\_parent.movie\_mc.\_currentframe - 1);  
}else{  
this.\_parent.movie\_mc.gotoAndStop(0);  
}  
}  
this.onEnterFrame = function(){  
this.videoRW();  
}  
this.onRelease = function(){  
delete this.onEnterFrame;  
}  
this.onRollOut = function(){ //this doesnt seem to work!  
trace(“hello”);  
}  
}
