xmlactionscript-3flashflash-cs5.5

AS3 load images from sub-directory


Is there a way to get all filenames within a subdirectory in flash using ActionScript?

From the research I've done, it seems like the answer is no, unless using AIR. This is not an option for me.

What alternatives are there? Can I do something like this using XML or something?

If so, where should I look to figure this out/what are some suggestions?

What I want to do is: Load all filenames into an array, then use that array to load images into my swf.

Can this be done without AIR?

I'm using CS5.5.


Solution

  • You could write a separate program (in AIR, or in something else) that scans a directory, generates an XML file, and stores it in a place where your SWF has access to it.

    From there you can load the XML with Flash, parse it, and load your images.