Simple question/problem

All im trying to do is everytime I press a “next” button i want it to add 1 to a variable and when i press “back” it subtracts 1 … theni can use that number to pull up a “image” + variable + “.jpg” and also display which picture is open in a textbox

thanks alot

on(press){
x++
_root.movieclip.loadMovie((“image”+x)+".jpg")
}
or something like that.

So then to subtract i guess it would be

on(press){
x–

?

that x++ doesnt seem to work right… ??

If you’re using Flash MX, place this on your main timeline:
[AS]
x=0; //I suppose there is an image0.jpg
next.onRelease = function(){
x++
l = “image”+x+".jpg";
holder.loadMovie(l)
}
previous.onRelease = function(){
x–
l = “image”+x+".jpg";
holder.loadMovie(l)
}
[/AS]

Got it… thank alot!!

No problem :wink: That code will keep increasing and decreasing. If you want it to load the first one again after the last one, I need to know the filename of the last and the first image.