Results 1 to 4 of 4

Thread: Help with Fade-in slideshow

  1. #1
    Join Date
    Apr 2010
    Location
    Bangalore, Indian
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Help with Fade-in slideshow

    Hello, I have a fade-in slideshow on my website, it works fine in all versions of IE but in other browsers the images don’t fade-in/fade-out and just change one by one.

    The body code is -

    HTML Code:
    <BODY onload="runSlideShow()"> 
    <div id="slideshow01"><img src="../01.jpg" name='SlideShow' width=600 height=400></div>
    The head tag code is -

    Code:
    <script>
    var slideShowSpeed = 5000
    var crossFadeDuration = 3
    var Pic = new Array() 
    Pic[0] = '../01.jpg'
    Pic[1] = '../02.jpg'
    Pic[2] = '../03.jpg'
    Pic[3] = '../04.jpg'
    Pic[4] = '../05.jpg'
    Pic[5] = '../06.jpg'
    var t
    var j = 0
    var p = Pic.length
    var preLoad = new Array()
    for (i = 0; i < p; i++){
    preLoad[i] = new Image()
    preLoad[i].src = Pic[i]
    }
    function runSlideShow(){
    if (document.all){
    document.images.SlideShow.style.filter="blendTrans(duration=2)"
    document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
    document.images.SlideShow.filters.blendTrans.Apply() 
    }
    document.images.SlideShow.src = preLoad[j].src
    if (document.all){
    document.images.SlideShow.filters.blendTrans.Play()
    }
    j = j + 1
    if (j > (p-1)) j=0
    t = setTimeout('runSlideShow()', slideShowSpeed)
    }
    </script>
    Any idea about where I am going wrong? I am using Dreamweaver CS4.

    Thanks,
    Sumeru
    Last edited by sumerub; 04-28-2010 at 03:17 PM.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    blendTrans is IE only and should be avoided

    google 'fade slideshow' for a more modern script
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    sumerub (05-02-2010)

  4. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    DD Admin

  5. The Following User Says Thank You to ddadmin For This Useful Post:

    sumerub (05-02-2010)

  6. #4
    Join Date
    Apr 2010
    Location
    Bangalore, Indian
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you for reply everyone... I will try them out.

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
  •