Hey yall question about an if else statement I am trying to write for a gallery. I want to have it so if picture is on last one to go to first set on xml. Heres what I am writing it as:
function nextImage() {
if (p<(total-1)) {
p++;
} else if (p==4) {
p =0;
}
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
wer.title_txt.text = title[p];
we.desc_txt.text = description[p];
picture.link = link[p];
picture_num();
}
}
I have it written on my next image function because many things refer to that so check here then proceed to first set if on last. The problem is it stays on 4 or last item in xml. Can someone hit me with some insight. Thanks in advance. mT