Jump to content
Search Community

Loading all the images in a folder…

Nickbee test
Moderator Tag

Recommended Posts

So let’s say I want to point LoaderMax to a folder and I want it to know all the images that are in that folder so it can populate a slide show. Is there a way to do this without using PHP or AIR?

 

My one idea would be if you had access to the files names to use sequential names like image0, image1, image2…

 

Then you could load the images in order until you received an error. It would be great if this could be done without access or knowledge of the file names in the folder. But I’m not sure it’s possible without PHP or AIR.

THANKS!!!!

Link to comment
Share on other sites

Nope, for security reasons Flash isn't allowed to read through directories and discover file names, etc. (at least not without the user initiating that). So you'd need to either involve PHP or store that info in an XML file that you'd read in or do the sequential naming convention like image0.jpg, image1.jpg, etc. and just create a bunch of loaders and sequentially load them until you get an error at which point you know you've reached the end but that seems pretty hackish and un-elegant.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...