Newest Articles

Flash Media Player
XML Driven Pie Chart
Base Defender
Hangman Game
8 Ball Pool

Popular Articles

True Fullscreen Flash Mode
Mp3 Player with XML Playlist
Create Pong
Hangman Game
Infinitely Zooming Image
Catapult Game

Random Articles

Hangman Game
XML Driven Pie Chart
Focus in on an Image
Infinitely Zooming Image
Image Slider


Shapes the Game
Link to SwfSpot
Swf Spot

Contact me on Google+

rss feed

Album Slide

Album Slide
AddThis Social Bookmark Button
Description: A dynamic photo album read from an xml file
Author: John Bezanis
Added: November 4th 2007
Version: Flash 8

This applet reads an xml file and puts together an image slider where an image is displayed at a larger size when clicked. The images are automatically scaled for best fit, and any dimensions will work. There are 3 attributes within each image node; the thumbnail, the caption for the pic, and the fullsized pic. Example format for the xml file:
<?xml version="1.0"?>
<image><thumb>thumbofpic1.jpg</thumb><caption>Pic 1 caption</caption><pic>pic1.png</pic></image>
<image><thumb>thumbofpic2.png</thumb><caption>pic 2 description</caption><pic>pic2.jpg</pic></image>
The default url for the xml file is sliderfeed.xml, but it can be set with the variable xmlfile like so:
<object data="39-albumslide.swf?xmlfile=someotherxmlfile.xml" type="application/x-shockwave-flash" width="500" height="400">
<param name="movie" value="39-albumslide.swf?xmlfile=someotherxmlfile.xml"/>

The applet can be used with any background color, by changing the color in document properties and setting the variable bgcolor on the main level to that corresponding color.
The Stage can be set to any size, with some minor adjustments.
To change the size of the maximized image, open up the movie clip imageholder and resize the instance "canvas" to the new dimensions. Exit out of the movie clip imageholder and move it to the new location.
The slider can be resized as well. Open up the movie clip slidercontainer and resize the instance "bg" to the new dimensions. Exit out of the movie clip slidercontainer and move it to the new location.
The source code with line by line comments is available below:

Download the Source File
Download the Built swf File
Comments Currently Disabled