Page 1 of 1

Combining XML, PHP and Flash

Posted: Fri Nov 21, 2008 6:49 pm
by antoine
Hello all,

I am looking for some ideas and a little help to make a dynamic flash photo album.

What I would like would be something like this:
  • - user goes to "photos" page (photos.php)
  • - this page contains a [dynamic] list of the albums (parsed XML)
  • - when a user clicks an album, it goes to photo_album.php adds an appropriate query string (such as photo_album.php?album_id=1)
  • - this page with the query string then opens the SWF, and loads all the images via XML
...here is the tricky part: at this point, I would like a different set of images to be loaded, based on the value of the query string.

To elaborate, if a user clicks on the first link and goes to photo_album.php?album_id=1, I would like the SWF to automatically get the data from the XML file named photoAlbum1.xml.

Now here is the catch: because I am a complete newbie to flash, rather than learning AS and making this myself, I bought coverFlip3D from flashframer.com. It's a component and therefore my access to the AS is very limited.

However, in the included API, you can change the string that indicates the filepath/name. I am thinking that, if the AS code to get and print the value "1" as "photoAlbum1.xml" is short enough to go in this line, it may work.

Because I don't know what I'm asking, and since I am much better (not an expert, though) with PHP, I may be able to do the following:
  • - based on the album_id query string value, I could get the contents of photoAlbum1.xml and save them into a standard file, such as "photoAlbum.xml". This way, the SWF is always calling the same XML file, but PHP is creating different content in it.
I am assuming that might pose a caching problem, but I may be wrong.

Please tell me your thoughts/code/new ideas relating to the above.

Thanks for taking the time to read through this all!
Antoine