# Sliding Gallery PLEASE HELP :(

**URL:** https://forum.kirupa.com/t/sliding-gallery-please-help/294851
**Category:** flash
**Created:** [August 20, 2009, 10:00pm UTC](https://forum.kirupa.com/t/sliding-gallery-please-help/294851 "2009-08-20T22:00:25Z")
**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 20, 2009, 10:00pm UTC](https://forum.kirupa.com/t/sliding-gallery-please-help/294851/1 "2009-08-20T22:00:25Z")

</div>

Hi there,  
Ok, I have a sliding photo galley with a previous and next button. I have added action script to tell the linked pictures to slide along and for the next button its fine (I took the script from a forum…as you do). I put stop commands on the key frames over the next picture, Now if I am on the 4th image and click previous, its goes all the way back to the start!? I have attached the action script, I am new to flash or at least intermediate so you may have to talk down to me but if anyone can help I would kiss ya!

stop()  
this.onEnterFrame = function(){  
if(rewind == true){  
prevFrame();  
}  
}  
next\_btn.onPress = function(){  
rewind = false;  
play();  
}  
prev\_btn.onPress = function(){  
rewind = true;  
}
