# How do i stop my slider sliding?

**URL:** https://forum.kirupa.com/t/how-do-i-stop-my-slider-sliding/218528
**Category:** Uncategorized
**Created:** [March 8, 2007, 3:18pm UTC](https://forum.kirupa.com/t/how-do-i-stop-my-slider-sliding/218528 "2007-03-08T15:18:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![naoimh](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@naoimh](https://forum.kirupa.com/u/naoimh)
#### Post date: [March 8, 2007, 3:18pm UTC](https://forum.kirupa.com/t/how-do-i-stop-my-slider-sliding/218528/1 "2007-03-08T15:18:24Z")

</div>

hi there, just joined & am a complete flash novice so please feel free to laugh at my bastardised script 🙂

i’m trying to make a dynamic slideshow taking in pics from xml. so far so good… (thanks to other peoples hard work!)  
i’d like my thumbnails to scroll left & right (just using next & prev buttons). all’s grand, they scroll… but my problem is i don’t know how to STOP them scrolling when i run out of thumbnails. i’m left with a gaping white space:)

i don’t suppose there’s an simple bit of code that says something like:

if (you run out of thumbnails) {  
stop(this.scrolling!!);  
} else {  
keep.scrolling(“your doing a great job”);  
}  
?

my scrolling code so far is:

function SlideMenu() {  
this.\_x += (newX-this.\_x)/10;  
this.\_y += (newY-this.\_y)/10;  
}

// This next line calls the funtion named SlideMenu  
menu\_mc.onEnterFrame = SlideMenu;

//The next line is where you indicate the total number of display area(s)  
PageTotal = i++;

//The following function is assigned to the Forward button  
next\_mc.onPress = function() {  
XNumber–;  
newX = -XNumber\*-50;  
newY = -YNumber\*0;  
}

//This is a similar function for the Back button except in reverse

previous\_mc.onPress = function() {  
XNumber++;  
newX = -XNumber\*-50;  
newY = -YNumber\*0;  
};

would really appreciate some help… i haven’t a clue what i’m doing 😉  
cheers  
naoimh
