Things have become a lot clearer for me since my last post so i hope this second attempt will make it easier for u to answer:
I have a ‘next’ button for a slideshow which i want to do the following:
on(press) {
_root.Number=_root.Number+1;
content.loadMovie(_root.Url);
}
where my variables have been defined in a Frame as:
var Url = ‘Pictures/photo’+Number+’.jpg’
var Number= 1;
The reason i have used the variable Number in my Url variable and not directly in the loadMovie target (which does work) is that i want to be able to sometimes change the variable Url. Eg. when a user clicks on a series button such as ‘Cities’ i could get the next button to cycle through the first picture in each series in my array serie[]:
_root.url = ‘Pictures/serie[Number]’+photo1.jpg
the problem remains that my next button continues to use the old value for number so i get the same image over and over again.
Anybody have any ideas??
in the above case, everytime you press “it” _root.Number will increase by one and you will then load the respective URL. i.e. if you keeping pressing “it” you will load:
Yes, i know, my question was how can i use the same button to also use
Url = ‘Pictures/serie[Number]’+photo1.jpg
im pretty sure u cant change a variable inside a function so how do i set it up so that i can change var url from the outside when needed.
ill repeat that the reason i want to be able to do this is that my next button has to cycle through images in a folder (photo1,photo2…) and also when the user clicks a series button cycle through only the first image of each folder (see above and previous message).
im sorry i wasnt clear enough the first time, can u give it one more shot?