Flash Slideshow with Captions via XML

Posted by rumi on August 15th, 2006 — Posted in Flash, Web

I have been working on a flash slideshow on and off and a couple of days ago I found http://whatdoiknow.org/archives/001629.shtml which does almost everything I wanted but not quite, so I got action-scripting. To see a demo of what I have done click the play button below.
 

The original slideshow by Dominey has a nice feature of loading the image location and various fade-out and timer values from and XML file so that the user can control most things from the XML instead of going into Flash to change things. What I needed was a way of displaying a caption for each photo and then to fade-out these captions with the photos.

I have extended the XML schema for the slideshow to include the text for each caption and also the position where the text is to be displayed and its alignment in the textfield. There are also variables for controlling the font-size,font-colour and the width and height of the textfields that display the captions. Here is the XML file which controls the above slideshow:

It would be nice to be able to also specify the font from the XML file but since the font has to be embedded into the swf I don’t think that can be done. It would also be nice to have a way of masking/resizing the frame to better handle different size images, right now the slideshow is assuming the images are all the same size as the stage size in the fla, it still works for different size images but it will crop images or leave unsightly blank spaces around images.

Download the source: slideshow_rumi.fla.zip

5 Comments »

Comment by DotMySpot

hiye, all these your art pieces?

Posted on February 20, 2007 at 11:47 PM

Comment by rumi

Yep, that’s my work, there is more in the gallery section.

Posted on February 21, 2007 at 7:14 AM

Comment by David

Do you know how to add a png logo above each picture? I tried doing it but it fades out before the 1st image is loaded.

Thanks for the XML text help! Great SIte!

Posted on November 3, 2007 at 4:39 AM

Comment by Chris

This is exactly what I was looking for!! Awesome. Only thing that seems to not work, is that the text overlaps each other. I’ve looked over the code, but cannot seem to see why this is happening. can you help? Many many thanks!

Posted on December 30, 2010 at 3:42 AM

Comment by rumi

Hi Chris,

When you say the text overlaps each other, do you mean the letters go over the top of each other? It’s been a while since I looked at this but it might be an issue with the font you are using or maybe the textbox for the caption is not big enough. If you can give me more details I will try to find what the problem is.

Regards,
Sam

Posted on December 30, 2010 at 7:33 AM

RSS feed for comments on this post. TrackBack URI

Leave a comment