# onRelease instead of onPress...Help plz :(

**URL:** <https://forum.kirupa.com/t/onrelease-instead-of-onpress-help-plz/294945>\
**Category:** flash\
**Created:** [August 22, 2009, 8:28pm UTC](https://forum.kirupa.com/t/onrelease-instead-of-onpress-help-plz/294945 "2009-08-22T20:28:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattyFlashNoob](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@MattyFlashNoob](https://forum.kirupa.com/u/MattyFlashNoob)\
**Post date:** [August 22, 2009, 8:28pm UTC](https://forum.kirupa.com/t/onrelease-instead-of-onpress-help-plz/294945/1 "2009-08-22T20:28:47Z")

</div>

I have some script for a sliding gallery and buttons to move the images. Could some one tell me how to change the function from onPress to onRelease so I can animate the button.

this.onEnterFrame = function(){  
if(rewind == true && counter \> 0){  
counter = counter - 1;  
prevFrame();  
}  
else if (rewind == true && counter \< 0)  
{  
rewind = false;  
}  
}  
next\_btn.onPress = function(){  
rewind = false;  
play();  
}  
prev\_btn.onPress = function(){  
rewind = true;  
counter = 8;  
}

Thanks  
Mat
