Book Store  
  Contact Us  
  Site Map  
Display photos with a Flash slideshow

Display photos with a Flash slideshow


Macromedia Flash has the ability to import external jpg files into a Flash animation. This gives it great potential for creating slidewhows of images.

I have used this feature to create a slide show viewer. A simple xml text file holds the details of the images, the flash animation reads the xml text file and extracts the image names and then loads those images into the animation.

Whenever you add or change an image, all you have to do is modify the xml text file which is very easy, and update the images on the web server. The flash animation will automatically pick up the changes.

The Flash 6 player is required to view the files - previous players will not work. However, this should not present too much of a problem as a large percentage of browsers now have Flash 6 installed. Those who do not will be re-directed to the Macromedia download site.

The advantages of this method are :

  • the pictures cannot be easily downloaded and stolen by right clicking on the image.
  • it provides a simple interface for the user to view your pictures.
  • new picture and details are easily added by editing a simple text file.

Using Flash does go someway to overcome the problems of image theft, and the simple user interface and ease of updating the images makes it a good technique.

Setting up

The files that you require are :

  • loadjpg.swf
  • slides.xml
  • config.xml
  • default.htm

The above four files should be placed in the same directory on your webserver.

Create a directory for you images. I call the directory 'images' and locate it directly under the three files.

Edit the slides.xml file

The structure of the slides.xml file should be easy to understand and consists of an image file name with a suitable description of the picture.

The image themselves can be any size but not more than 650 pixels wide by 500 pixels high.

<slideNode jpegURL="images/image1.jpg">The River Avon just outside of Chippenham, Wiltshire.</slideNode>
<slideNode jpegURL="images/image2.jpg">Reeds and bank of the River Avon.</slideNode>
<slideNode jpegURL="images/image3.jpg">The river edge : the Avon Chippenham, Wiltshire.</slideNode>
<slideNode jpegURL="images/image4.jpg">A road side hedge.</slideNode>
<slideNode jpegURL="images/image5.jpg">Mud and water.</slideNode>

You will need to modify the sample default.htm file to fit in with the rest of your site.

Edit the config.xml file

The configuration file provides the following set up options:

Defines if you want the description text to fade or not.

Defines the background colour of the flash stage.