McMaster University

Faculty of Health Sciences
Web Design

Scope of Search

How to install an XML-based Flash Slidehow

An XML-based Flash slide show is available for download. The Flash file is small (2KB) and contains only actionscript programming. The actionscript program first reads the image file names from XML file (images.xml) and then imports the images into the flash slideshow. The XML file must be in the same directory as the Flash slideshow file (slideshow.swf). The images may be in any folder in the website. However, the relative path in the XML file for each image must be specified from the location of the HTML file that includes the Flash slideshow. All images should have the same dimensions for the slideshow to display well.

If you need more than one slideshow, create a separate folder for each slideshow and copy the Flash slideshow file to each folder. For example, the FHS website contains the folder slideshow with subfolders for each individual slideshow (FHS Home, FHS News), as follows:

Flash slideshow folder structure

Download ZIP file that contains a demonstration of the XML based Flash slideshow:

Flash Slideshow Zip file

All you have to do is put your own images into the images folder and edit the images.xml file in the slideshow/home/slideshow folder. Replace the file names for the images with your file names. You can have as many or as few images defined in the XML as you want. You may also change the settings in the XML file according to the comments contained in the file. Then you put the files in the appropriate place in your website. Note: the file names in the images.xml file are absolute starting at the website root folder.

The Flash slideshow source file (slideshow.fla) contains the code for the slideshow, and only needs to be changed if you want the canvas size for the slideshow to be different. The slideshow in the download file has a canvas size of 776 pixels wide by 200 pixels high. To change the canvas size for the slideshow, use Flash to edit the slideshow.fla file, change the canvas size, and publish a new slideshow.swf file. All of the images for the slideshow must be the same size as the canvas size for the slideshow.

When you change the images that are listed in the XML file (images.xml), then you should be aware that browsers cache not only web pages but also any linked files including the XML file and its images. There are 2 measures that can be taken to prevent the files from being cached. The first alternative is to put Meta tags in your page (or HTTP headers if you are using a programming language such as PHP) to not cache the page. The second alternative is to change the file names of the both the images XML file and the image files that are listed in the images XML file. The images XML file (images.xml) name must be changed in the Flash slideshow source file (slideshow.fla), and the flash executable file (slideshow.swf) would need to be re-created.