XML driven Flash slideshow improved

It’s amazing how resources and scripts get improved from user to user.

Christoph B. sent me a improved version of the XML driven Flash slideshow based on a script by Sephiroth I improved.

Does it sound messy? Let’s understand what happened:

1) Sephiroth published the gallery
2) I improved Sephy’s gallery
3) Christoph improved my gallery, here it is his message:

“I’ve modified the sources for the XML driven slideshow a little bit to include the LINK attribute as well. Thought you might be interested in it.”

The final result is a XML driven Flash Gallery where you can custom images, image transitions, pauses between image transitions and, thanks to Christoph, url to be redirected when you click on an image.

This is the XML that drives the gallery, commented by Chris.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version="1.0"?>
<!-- 
PAUSE:
set default pause in milliseconds
 
TRANSITION:
set transition number from 1 to 9
set transition number to 0 for random effect
 
ALT_PAUSE
if set, in milliseconds, determine the pause before showing next image
if not set, the pause will be the default pause
 
 -->
<RSS PAUSE="6000">
	<IMAGE TRANSITION="0" ALT_PAUSE = "6000" LINK="http://www.google.de">gallery01.jpg</IMAGE>
	<IMAGE TRANSITION="0" ALT_PAUSE = "6000" LINK="http://www.adobe.com">gallery02.jpg</IMAGE>
</RSS>

Download the gallery and enjoy

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)
Loading ... Loading ...
Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 48 comments

  1. XML driven Flash slideshow at Emanuele Feronato

    on May 13, 2007 at 3:28 pm

    [...] XML driven Flash slideshow Published September 6th, 2006 in Flash. May, 13th update: improved gallery with linkable images here [...]

  2. fredrik

    on May 13, 2007 at 9:00 pm

    i’m looking for a piece of software just as the one you’ve generously published here, with one minor tweak; i need the module that displays the slide show to take a named xml file as input, not just a images.xml. is there anyway i can go about and change the source to achieve this (i am in no way familiar with creating flash programs)?

    thanks,

    f

  3. jz

    on May 28, 2007 at 10:21 pm

    Hey Fredrik,

    I’ve been looking at the code to try to do exactly what you’re looking for. I couldn’t find any xmlData.load functions, but after a while I think I got it to work.

    In the ImageFader movie clip, find the code that says:

    if (this._xmlfile != “”) {
    this.loadXML (this._xmlfile);
    }

    and change it to:

    if (this._xmlfile != “”) {
    this.loadXML (“YOURFILENAME.xml”);
    }

    Hope this helps

  4. Brandon

    on July 5, 2007 at 8:04 pm

    Still appears to be an issue withs some of the transition effects (last bar sticks, etc). What FPS were you using that you didn’t have this problem with? Also, was just curious if you had found a fix for it as well.

    Have tried 12/18fps with no luck, am working with a few other as well.

  5. Peter Harrison

    on July 12, 2007 at 12:20 pm

    Hey jz,

    First of all excellent script. Thanks for all your great work.

    I was wondering if there was any way of linking to pages within a flash movie. For example i would like to navigate to a label on my timeline instead of an external url.

    Cheers

    Pete

  6. Daniel

    on August 7, 2007 at 1:26 am

    Hi,

    its a pitty that you can not choose the size of the slideshow.
    If I choose a smaller size, the pictures would also be resized :(

    Cheers,
    Daniel

  7. Josh

    on September 26, 2007 at 9:14 pm

    Thanks so much for the slideshow. I’m implementing it as a “site features” banner that displays/changes some textfield html (thanks to tufat.com’s flash textarea) alongside the changing image. My ultimate (yet futile) goal is to gain permission from the slideshow authors and make this into a drupal module. Anyway, my question is this: How do I override the progression of the images so that the user can manually pause/forward/rewind the slideshow?

  8. Randy K

    on October 22, 2007 at 9:51 pm

    Hi,
    I am just looking for a way to not have the pictures open a new window when clicked. But rather open in the same window. Like: target=”_top”

    Please help!

    Thanks,
    Randy

  9. David

    on November 2, 2007 at 8:41 pm

    Wow! Good job! How do you add a png logo that overlays every picture? Is there a way to add text too?

  10. Luka

    on November 15, 2007 at 11:57 am

    This is perfect for me, thank you.
    Is there a way to make it display any of the images randomly instead of order?

  11. Aline

    on December 5, 2007 at 5:50 pm

    hi Emanuele,

    Im trying to out the files to different galleries, but my back end doesnt allow multiple files with the same name.

    How to change the xml file name and still have it load the correct images?

    Thanks,

  12. Aline

    on December 6, 2007 at 9:47 pm

    Hi Emanuele,

    Im trying to figure out how to point the last image to play a video within the flash file. Could help me out, give me some pointers?

    Mille Grazie!

    -Aline

  13. Grace

    on January 3, 2008 at 8:56 am

    This is exactly what I need! And, your code is super clean and easy to follow. I was quickly able to modify the code to fit my needs. Thanks so much for your great work!

  14. Mark

    on January 9, 2008 at 9:06 am

    This doesn’t work in Mozilla Firefox

  15. Jeavon

    on January 14, 2008 at 3:45 pm

    Great work, just one thing, does anyone know how to fix the problem of a smaller image loading on top of a larger image and the larger image staying underneath until the transition on the smaller image has finished and it suddenly disappearing?

  16. rj

    on February 8, 2008 at 12:49 am

    Is there any way you can save and provide an fla file version that works with flash mx 2004 (i think that would be pre flash 8)?

    i have not upgraded my software and would like to
    be able to modify the fla file with my current version of flash..

    thanks in advance.

  17. john

    on February 9, 2008 at 8:35 pm

    this is exactly the same feature i am looking for.
    is there a way to make it so that whenever the link is clicked it will go to window that is active? (top)

  18. Robbie Gilchrist

    on February 11, 2008 at 8:28 pm

    Thanks for the great file. If possible could you let me know if it is possible to load the images at random?

    Cheers.

  19. Kevin

    on March 31, 2008 at 6:54 pm

    Hello, great gallery, how do you change the xml file specified, like to be able to change it from images.xml and to be able to use multiple galleries, if you could email me I’d greatly appreicate it thank you.

  20. Ryan

    on April 2, 2008 at 11:19 pm

    Does anyone know a way replay the slideshow after going through all the slides in the XML file. I dont want it to stop after it gets to the last slide, I want it to just replay over and over.

  21. Ryan

    on April 2, 2008 at 11:45 pm

    Forget my last comment, I figured everything out… Thanks for posting this great slideshow!!!

  22. Paul A

    on May 9, 2008 at 8:01 pm

    Excellent. But it seems to only implement 5 photos and no more. Also will not loop. Is there any way to remove the black borders on the sides so that the photos take up the full width? I did a work-around using a container DIV, but would rather not have to.

    Thanks!!

  23. Paul A

    on May 9, 2008 at 8:20 pm

    OOPS. Sorry about the 5 photo limit and no looping. I had made an error in naming one of my images. But the black borders question still stands.
    Thanks.

  24. padmaraj

    on July 1, 2008 at 7:28 am

    Hi,

    Its really great effort from U…Thanks for such a great code.

    Is it possible to include text in this file?

    Please include captions on the Images..

  25. Arlen

    on July 23, 2008 at 8:15 pm

    Almost perfect for what I needed except I’m having a problem where the previous image is still displaying behind the top one. Can anyone tell me how to clear the previous image once the current one is fully loaded?

  26. Albin Malmgren

    on August 15, 2008 at 1:18 pm

    Hi,
    an answer to the question about randomizing the slide.

    A very quick and dirty way is to set the _count to a random number from the _DataProvider.

    1. Add an attribute in the XML there “0″ is off and “1″ is switch on

    2. Create a var in the loadXML function above the for-loop.

    _random = this.firstChild.attributes.RANDOM;

    3. Randomize the _count in the makeFader function.

    1st place in the beginning of the function to randomize the start image.

    if(Math.abs(_random) > 0){
    this._count = Math.round(Math.random() * (this._dataProvider.length – 1));
    }

    2nd place is to rnd the next comming img.

    Catch up the _count++ in the this.onEnterFrame = function() and replace it with this code.

    if(Math.abs(_random) > 0){
    this._count = Math.round(Math.random() * (this._dataProvider.length – 1));
    } else {
    this._count++
    }

    Ok, it´s not the best practise way but it works :)

    cheers!

  27. Awais

    on September 3, 2008 at 5:05 pm

    Hi,
    I have check your slideshow its really useful just that I have checked that it is loading all the images in xml at same time, can it preload only one next image in advance and continue like this.
    thanks in advance

  28. ankit

    on September 20, 2008 at 8:33 am

    I love this example and i got issue with link openning in new window can u pls tell me how to get it open in same window thanks…

  29. masa

    on September 29, 2008 at 5:42 am

    Same question here
    How link could be openend in same window instead of new window ?

    Thanks

  30. masa

    on September 29, 2008 at 5:46 am

    Same question here
    How links could be opened in same window like: target=”_top” instead of new window

    Please
    Thanks

  31. Bugsy

    on September 29, 2008 at 8:08 pm

    just change
    from getURL(newsite,”_blank”);
    to getURL(newsite,”_parent”);

    this in in your .fla file script for imageLoader

  32. Paolo Gabrielli

    on October 6, 2008 at 6:08 pm

    @Jeavon:
    try to make it load an empty PNG file: same size but all transparent.

  33. Mike Martello

    on October 7, 2008 at 5:57 pm

    Is there a easy way to make the slideshow randomize the pics and the starting pic as well?

    I tried Albin’s way, written above, but I couldn’t make work…

    Can someone help me with this?

    Thanks

    BTW, Great job Emanuele!

  34. Andreas

    on November 3, 2008 at 6:05 am

    Great work Emanuele, works great.

    Im just having a problems with the image loading animation not working properly with the .FLA supplied ?

    I don’t get any loading animation at all, even with a 2-3 mg file.

    Also if you embed the flash file in a HTML document that is not in the same directory as the XML and .swf, the gallery does not work =(

  35. Kevin

    on January 15, 2009 at 2:10 am

    Quote Bugsy: “Just change

    from getURL(newsite,”_blank”);
    to getURL(newsite,”_parent”);”

    If I use the above, can the images still have their own link as noted in the xml file? When I tried to add this it wants a getURL(URL, window, method). Wont this cause the entire flash slideshow to open only one URL specified in the action script?

  36. Aaron

    on June 8, 2009 at 8:27 am

    Hello Kevin & Bugsy

    Im trying to change the target as well. Sure changing

    from getURL(newsite,”_blank”);
    to getURL(newsite,”_parent”);”

    Would work but this code doesnt exsist in the fla. Any other suggestions

  37. LondonBaba

    on June 30, 2009 at 6:15 pm

    I have chenged the size of the slide show and the images are the same size. 125px 302px but when i put it in the xml file it get really small not the size of the .jpg. Any help would be appriciated.

    Thanks
    Baba

  38. jean

    on July 23, 2009 at 8:22 pm

    Hey, when I run the swf through a flash player it works fine, but when I embed the swf using swfobjects 2.2 it appears the xml file is not loading. Looking at the source on the page, it appears it is not necessary to add anything to include the xml file.

    Any ideas why the xml file is not loading?

  39. Giuseppe

    on November 18, 2009 at 11:56 am

    Hi, first of all I found very useful your flash slideshow. Then I used it in a Joomla template and I had a little bit of problems because of the relative path of image.xml files. So I modified the flash source so that the user can define where the image.xml (or whatever you want call it) and load throughout js scrpit (loading an SWFObject).
    The changes in your code are:

    if (_root["_myfile"]!= undefined) {
    this.loadXML(_root["_myfile"]);
    }
    else if (this._xmlfile!=”"){
    this.loadXML(this._xmlfile);
    }

    As you can see if no file is specified it works as before.

  40. Phil

    on December 3, 2009 at 3:07 am

    What about image/jpg caching? Is there a way to cache the images so they only load one time?

    I think that the Flash movie is always reaching out to the server to grab the image/jpg. So a looping slideshow will hit the server until the user closes the page.

    Thanks.

  41. sweta

    on December 9, 2009 at 10:02 pm

    amazing..thanks a ton…by editng the fla file i was able to animate bigger images larger then 500px..thanks again..my search ends here..!

  42. WebMasteRD

    on January 13, 2010 at 4:50 pm

    How can we add title and comment to this script?

  43. Luis

    on January 13, 2010 at 7:51 pm

    How to clear the last picture on screen! in case you are ussing pictures with different sizes

    Many thanks

  44. Mobi

    on February 3, 2010 at 11:47 pm

    good ! i search , i search and at end i find on your website thanks :)

  45. JD

    on February 7, 2010 at 3:25 pm

    Hi I was trying this out and two of the transitions aren’t working correctly. I managed to work out it was transition 6 and 7. Even when you look at the demo you will notice that the photo underneath is showing but only on these two transitions. Is there a way to fix this. I assume it has something to do with the action script but I don’t know how to fix it. All the others work great.

  46. Pat

    on March 17, 2010 at 3:36 pm

    Your slideshow is just great!
    Is there a way to put a preloader?
    I would like to use it with soem dozen of pictures and it could be quite long to start.
    But I can’t use a preloader for that.

    Thanx, and good job !

  47. Eduardo Augusto

    on July 6, 2010 at 8:28 pm

    Adorei o slide, mais gostaria de saber se vc tem como postar um com setas, para traz e para frente e pause.

    Mesmo assim mantendo o link sobre cada foto, que é isso que esta dificiul de achar na net.

    O pior você ja fez, falta só as setas.
    Eu tenho um completinho com as setas mais não tem links nas fotos para abrir sites externos.

    E eu preciso disso porque na verdade é um banner de publicidade, vai mudar direto, então preciso que segue em XML e AC2. pois vou carregar em um outro movie clipe no home.

    Se puder me ajudar ai vai meu email.
    smentretenimento@gmail.com
    Obrigado.

  48. Gabriel

    on January 13, 2012 at 3:12 pm

    Hi Emanuel,

    Thanks for the great banner – there are some features which I feel are still missing from this Flash app to make it the best on the internet. A preloader would be really welcome to the banner, as well as having the possibility to add text fields to it. Right now I am using the Banner Rotator FX from developers flashxml.net and it has all these features included. Plus you have a bigger selection of transitions, over 100 from which to chose from.
    Would really like to see that this banner gets updated too.