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 ...
If you found this post useful, please consider a small donation.
» 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.

47 Responses

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

  2. fredrik says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

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

  10. Luka says:

    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 says:

    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 says:

    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 says:

    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 says:

    This doesn’t work in Mozilla Firefox

  15. Jeavon says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

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

  22. Paul A says:

    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 says:

    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 says:

    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 says:

    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. 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 says:

    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 says:

    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 says:

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

    Thanks

  30. masa says:

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

    Please
    Thanks

  31. Bugsy says:

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

    this in in your .fla file script for imageLoader

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

  33. 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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    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 says:

    How can we add title and comment to this script?

  43. Luis says:

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

    Many thanks

  44. Mobi says:

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

  45. JD says:

    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 says:

    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. 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.

Leave a Reply