XML Flash Photo Gallery

  • thorner
  • Born
  • Born
  • thorner
  • Posts: 3

Post 3+ Months Ago

Hi, I'm developing a website for a friend who owns a photography business. I'm using Flash CS3 and AS3, as well as publishing to AS3.

I have a decent photogallery script already, however it falls short in one aspect. It works by using an XML file which contains all of the names of the images and their descriptions, however the problem is that the woman who owns the photography business has about a thousand photos. Needless to say I'm less than excited about copying and pasting one line of code a thousand times and changing it over and over again.

The woman I'm developing this for would also like to be able to update it herself (she has no prior knowledge of coding at all) so updating the XML every time would not really be an ideal option for her. It would also be a relentless task for me to update the site every time she takes more pictures.

Anyway my question is this, is there a way to get Flash to pull images externally from a folder? For example, my friend has pictures from various continents, and she likes to organize in various albums. So the ActionScript I'm looking for would hopefully enable the user of the website to navigate to Africa, and one of the albums within that category, and then display those pictures in a controllable slideshow. With this setup I'm hoping that she could just upload her pictures into the correct folders/make new folders (which would obviously require me to update the flash as well but hopefully would not require creating a new XML file).

If this is impossible to do with XML and AS3 I understand, it's more a matter of convenience and efficiency than necessity. I should also mention that I'm not the most advanced Flash user in the world, I do know basic AS and have made Flash sites in the past, but nothing spectacularly difficult.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

well its possible to do that with flash BUT it frequently doesn't work very well with different hosting platforms. Typically the best bet is to use your favorite serverside script language (php, asp, .net, jsp) to dynamically write the xml file that flash needs to process the images.
  • thorner
  • Born
  • Born
  • thorner
  • Posts: 3

Post 3+ Months Ago

Alright that makes sense, are there any good tutorials related to that? I know a little PHP but if another language would be better I'm willing to learn.
  • CStrauss
  • Graduate
  • Graduate
  • User avatar
  • Posts: 122
  • Loc: St. Louis MO. USA

Post 3+ Months Ago

This is what I do when someone wants a flash gallery... I use php and a mysql database to generate a xml file and create an admin section for them to upload images their self. not sure how familar you are with php and myslq but this task is pretty straight forward.


Here is a link on how to do it. http://articles.techrepublic.com.com/5100-10878_11-5035149.html

basically what this will do is each time someone visits the site or gallery how ever you want to implement it it will query the database and create a new xml file and save it on your server.

Then all you have to do is make a simple upload form for your client to upload images themselves.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

You can also get the pictures from a folder, using php, then generate the xml. If she has about a thousand photos, it will make much more sense just to update the folders, instead of adding / editing from a php script. Of course this method has a drawback, because you can't add any info to the photos. So if she doesn't need any description / title for the photos, then i would definitely opt for this.
Just google for "php get files in directory" to find how you can do it.

This way, even if you have more galleries, with each gallery in a certain folder, from php you can get all the folders from the galleries folder, then use their names as galleries names, and use the same method above to get the files from those folders.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.