load pictures xml, mysql

Discussion in 'Web Design and Development' started by MuhaedDib, Oct 11, 2008.

  1. MuhaedDib macrumors newbie

    Joined:
    Oct 11, 2008
    #1
    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
     
  2. myjay610 macrumors regular

    Joined:
    Jan 6, 2008
    #2
    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.
     
  3. MuhaedDib thread starter macrumors newbie

    Joined:
    Oct 11, 2008
    #3
    Thanks myjay610... seems like I've been looking at it in the wrong way. Thanks for the advice.
     

Share This Page