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
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]
No problem 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.