How do edit the code in the photo gallery so that I can search for next jpg 1.jpg, 2.jpg etc and then when it hits the last one it will start to the first one
I have it set to
pic = “1”
pic + “.jpg”
this way I can change the number of pics in the folder without changing the code?
It means that if you want to change something, all you have to do is change the array and upload the corresponding pictures. How more dynamic can it get ?
What I am trying to figure out is to enter code that will automatically keep adding 1 to .jpg until there is no file and then it will start over. That way I can change the folder contents WITHOUT CHANGING THE CODE every single day.
Is there something in actionscript that is like 'error handleing" that way is can say along the linds…if attempt to retrieve image failes then start over with pic = 1?
hmm… PHP is a good answer, and probably the one that will offer the most flexibility.
You could load array from variables in a text file, that way, the array is dynamic, so you can leave your swf alone. When you add pics to the folder, add some values to the txt file and have flash build the array from the items in the text file. Otherwise, if you want to be totally dynamic, build your MySQL database where you will put your pics, insert new pictures with php/html front end, this will automatically assign the new pic a new name in sequence (lastnameused+1). Then, have php build the array for you and feed it to flash.
That is about as dynamic as you can get…
you may still have to take the pictures yourself! ahahahahahaah