# Please help sliding gallery

**URL:** https://forum.kirupa.com/t/please-help-sliding-gallery/296093
**Category:** Uncategorized
**Created:** [September 9, 2009, 2:00pm UTC](https://forum.kirupa.com/t/please-help-sliding-gallery/296093 "2009-09-09T14: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: [September 9, 2009, 2:00pm UTC](https://forum.kirupa.com/t/please-help-sliding-gallery/296093/1 "2009-09-09T14:00:25Z")

</div>

I want to make a sliding gallery that plays a certain amount of frames and stops.

I have this script

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

Instead of play() i have tried putting a counter in like counter 8 but it does not work.  
The idea is that if i click the contact button but im on the home page its scrolls over all  
other pages and stops on the home page.

Any Ideas?

Thanks  
Mat
