Dynamic Image Viewer - Just upload your image
This is a dynamic image viewer that can count files in a folder based on a sequence of images (1.jpg, 2.jpg, 3.jpg, etc.). It determines the max number of images in a folder based on the last image it can load. If you want to add a new image, just create it with the next number? in line (i.e. 4.jpg) and it will detect it. There’s quite a bit of different things you can do with this… I’ve added a simple slideshow button as an example. Check out the demo or download source? (Flash
!
Some background on this viewer:?
I’ve been wanting an image viewer that doesn’t require a whole lot of work to add new images to, with just using Actionscript.? Our primary options for a dynamic viewer? (at least to my knowledge) are:?
- XML: XML is great, but you need to upload it and the image. Benefit is that you can change the order of images pretty easily.
- LoadVars: Same as XML, two files to update.
- Variables: Same as XML, two files to update.
- PHP/ASP/JSP: Works great - you could get a file list, load it into an array and you’re set. Problem with this is that it is server dependent and doesn’t work on all servers - limited support available. This is my problem.
So, I decided to put something together that will do the trick. The only catch - your files must be in a sequence (1.jpg, 2.jpg, 3.jpg, etc.). And, it takes a bit of time for it to detect how many files are in the folder — I could probably optimize this some more for larger file archives, but it’s fast enough for me for now
- Jacob
// Jacob





February 7th, 2007 at 9:16 pm
Not sure why you have no comment yet but this worked out great for me. I too dont like the server dependant ability with php even with its slightly better handling. This is simple and works great. Thanks for the help and the opensource/opensharing
May 7th, 2008 at 12:51 am
this very usefull to me and this is worker out of rich os that is very good tutorial. thanks
July 29th, 2008 at 5:14 am
nice one! pretty smart idea!
February 10th, 2009 at 12:23 pm
I could be wrong,but smth is smelly;this piece of work was done in 2006,in 2009 we are still stuck in editing xml files;3+1 comments..only,ohwell
thank you,learned a lot