PDA

View Full Version : Reading all files in a folder


Persuader
07-24-2009, 02:46 PM
Is it possible to have Flash find all files in a specific folder, and load them into an array or whatnot?

For example, if I made a web application which showed all photos from a certain folder in a slideshow, can I do that without XML, but by simply placing the pictures inside the folder?

werehunt
07-24-2009, 05:00 PM
http://www.thetechlabs.com/tutorials/xml/create-an-intelligent-xml-image-gallery-slideshow-in-flash-cs4-php-part-iii/

ASWC
07-24-2009, 06:27 PM
I suggest you read my tutorial here:
http://www.actionscript.org/resources/articles/892/1/Dynamic-Slide-Show-AS3-Complete-Guide-Part-1-Loading-Data/Page1.html
there's a few php examples one being about reading content on a folder.

Persuader
07-24-2009, 09:44 PM
Thank you both very much for the help!
But what if I wanted to make an offline CD application?

I know this would not be updateable, but I thought it would be simpler than actually writing a mile long XML file containing info about all the images. If all the images are of the roughly same dimension and a minimal amount of editing is required for each, can I put them all in one folder, and have Flash pull them from there into the presentation without PHP?

lordofduct
07-24-2009, 10:07 PM
AIR applications have much more file support (which are then also ran locally). But you need to specifically code and compile it as an air app.

I'm not sure if/how this is done using Flash CS3/4. But with the Flex SDK (comes with compiler) which is available as the SDK for free, or packaged with the Flex Builder IDE, you can create these kinds of apps easy.

Persuader
07-30-2009, 03:09 PM
Flash CS4 has a very good compatibility with everything AIR, as well as publishing files in Air format.

I guess I'll google around for file manipulation in AIR, if you say it's easy I should be able to find and implement such a thing.

Thanks!