Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MuhaedDib

macrumors newbie
Original poster
Oct 11, 2008
2
0
Hi there,
I’m building a website in flash that needs a photo gallery to be loaded from a mysql database, at this point I have an xml file that loads the photos to the gallery only if I type the full path of the images manually. Like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<images>
<image>
<url>pics/img_1.png</url>
<big_url>big_pics/img_1.png</big_url>
</image>
<image>
<url>pics/img_2.png</url>
<big_url>big_pics/img_2.png</big_url>
</image>


Is there any way how I can create the paths for the photos automatically ideally communicating with the database but even just reading the contents of a given folder would be enough ( maybe iterating). This is something that’s been driving me nuts and I just can’t seem to find information about it.
Thanks
 
Not entirely sure what your asking, but it seems like you just need to dynamically load the images out of a directory into the flash file. You can use PHP to iterate through a directory and generate the xml file or add the files to a database. You can google this and find a myriad of example scripts.
 
Thanks myjay610... seems like I've been looking at it in the wrong way. Thanks for the advice.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.