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.

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

Download the gallery and enjoy

Improve the blog rating this post
Tell me what do you think about this post. I'll write better and better entries.
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 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.

33 Responses to “XML driven Flash slideshow improved”

  1. fredrik on May 13th, 2007 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

  2. jz on May 28th, 2007 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

  3. Brandon on July 5th, 2007 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.

  4. Peter Harrison on July 12th, 2007 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

  5. Daniel on August 7th, 2007 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

  6. Josh on September 26th, 2007 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?

  7. Randy K on October 22nd, 2007 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

  8. David on November 2nd, 2007 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?

  9. Luka on November 15th, 2007 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?

  10. Aline on December 5th, 2007 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,

  11. Aline on December 6th, 2007 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

  12. Grace on January 3rd, 2008 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!

  13. Mark on January 9th, 2008 9:06 am

    This doesn’t work in Mozilla Firefox

  14. Jeavon on January 14th, 2008 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?

  15. rj on February 8th, 2008 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.

  16. john on February 9th, 2008 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)

  17. Robbie Gilchrist on February 11th, 2008 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.

  18. Kevin on March 31st, 2008 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.

  19. Ryan on April 2nd, 2008 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.

  20. Ryan on April 2nd, 2008 11:45 pm

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

  21. Paul A on May 9th, 2008 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!!

  22. Paul A on May 9th, 2008 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.

  23. padmaraj on July 1st, 2008 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..

  24. Arlen on July 23rd, 2008 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?

  25. Albin Malmgren on August 15th, 2008 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!

  26. Awais on September 3rd, 2008 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

  27. ankit on September 20th, 2008 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…

  28. masa on September 29th, 2008 5:42 am

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

    Thanks

  29. masa on September 29th, 2008 5:46 am

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

    Please
    Thanks

  30. Bugsy on September 29th, 2008 8:08 pm

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

    this in in your .fla file script for imageLoader

  31. Paolo Gabrielli on October 6th, 2008 6:08 pm

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

  32. Mike Martello on October 7th, 2008 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!

Leave a Reply




Trackbacks

  1. XML driven Flash slideshow at Emanuele Feronato on May 13th, 2007 3:28 pm

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