analyzing external files? ie: counting and loading sequentially
I'm building your basic portfolio/gallery site but trying to do everything dynamically.
What I've got is a menu that loads dynamic jpgs into a MC, depening on the button clicked it finds the right file from the right folder. Thats great for the first image of a series but I would like to have a "next" button that just finds the next jpg in that particular folder and loads it. Ideally when it has run through them all it will loop to the first jpg... but one thing at a time I guess.
I've got folders like "2003.01", "2003.02", "2003.03", etc and within each of those I've got jpgs named 01.jpg, 02.jpg, etc. If each folder had the same number of jpgs this would be much easier I think but thats not possible.
How can I load the next jpg dynamically using actionscript?
Flash has to know how may images there are in a folder to be able to change change folders. Then the folder names would be put in an array that Flash picks from.
A next button could look like this.... ( the zero before the number complicates things, this example is for a non zero at the beginning ).
thats the stuff I'm looking for, and I think I can get that working ok, but any ideas on being able to count the # of jpgs in a folder to set a variable so it only advances if i <= #ofjpgs.
I don't know if flash has this capability but it seems there would be some way with a little bit of improvisation...
Flash can not check folders by itself. But with a serverside script checking the results can be sent in to Flash. Depending on what your server supports you can use php,asp or cgi.
I'm not gunna go there, too much for me to learn right now.
How about if the script checks to see if a jpg loaded and if not, starts over at 1.jpg? This asumes that the jpgs dont fail to load for someother reason.
Sorry to drag this out like this, but I been wrestling with the damn thing for too long now. I've made up a little example fla, so if any of ya'll would give it a look, it would be greatly appreciated.
I realized too late that I forgot the slink11 and I also thought I tried the _root.slink11 but I will give it all another shot when I get back on sunday.