Results 1 to 7 of 7

Thread: Ultimate Fade-in slideshow (v1.5): stop the slide show at the end

  1. #1
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow (v1.5): stop the slide show at the end

    Hello
    Can somebody help me? I tried out the Ultimate Fade-in slideshow and I think it is really great. My question is:
    Is there a possibility to stop the slideshow automatically as soon as the last picture is displayed?
    Thank you in advance for answers.
    Heinz

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    To preserve the multiple shows feature of this script and have an option for any given one to stop after one time through, make these modifications -

    to the function 'fadeshow' (additions red):

    Code:
    function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, onetime, displayorder){
    this.flag=0
    this.onetime=onetime
    this.pausecheck=pause
    this.mouseovercheck=0
     . . .
    to the function 'fadepic' (near its end):

    Code:
     . . .
    obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
    if(obj.flag&&obj.onetime)
    return;
    if(obj.nextimageindex==obj.postimages.length-1)
    obj.flag=1
    obj.populateslide(obj.tempobj, obj.nextimageindex)
    obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
    setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
    }
    }
    Now the syntax for invoking any given slideshow instance has an added parameter - 'onetime':

    Code:
    <script type="text/javascript">
    //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), onetime (0=continuous, 1=one time), optionalRandomOrder)
    new fadeshow(fadeimages, 140, 225, 0, 3000, 1, 1, "R")
     
    </script>
    In the above example, the slideshow invoked will stop at the last image. If the red 1 were set to 0, it would run continuously.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Dear John
    Thank you very much. The modifications work fine.
    Heinz

  4. #4
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Does this work for the newer version

    Hello. I tried the modifications but my slideshow still loops http://www.cffit.com . Here is my fadepic portion and I do have the onetime setting set to '1' as opposed to '0':

    function fadepic(obj){
    if (obj.degree<100){
    obj.degree+=10
    if (obj.tempobj.filters&&obj.tempobj.filters[0]){
    if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
    obj.tempobj.filters[0].opacity=obj.degree
    else //else if IE5.5-
    obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
    if(obj.flag&&obj.onetime)
    return;
    if(obj.nextimageindex==obj.postimages.length-1)
    obj.flag=1
    }
    else if (obj.tempobj.style.MozOpacity)
    obj.tempobj.style.MozOpacity=obj.degree/101
    else if (obj.tempobj.style.KhtmlOpacity)
    obj.tempobj.style.KhtmlOpacity=obj.degree/100
    else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
    obj.tempobj.style.opacity=obj.degree/101
    }

    Thanks for your help.

  5. #5
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Never mind, I figured it out. Thanks - great script and mods.

  6. #6
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Great addition to this script! Worked perfectly.

  7. #7
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Can anyone advise, I want the ultimate fade to run once and then automatically go to another html page, can anyone advise how this can be done. I can alway put a link message anyway.... Skip intro... but I would like it, if the fade slideshow would finish and go automatically to the main homepage

    Any help great appreciated.

    Cathal

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •