Results 1 to 3 of 3

Thread: Blending Image Slideshow Script

  1. #1
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Blending Image Slideshow Script

    1) Script Title: Blending Image Slideshow Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/image4.htm

    3) Describe problem: Wanting to change the code.

    Hi,

    I was wondering if there's a way for me to change the code, so it won't automaticly start, but only start when you mouseover the image. Like this:

    mouseover image1: fade into image2
    mouseover image2: fade into image3

    etcetera.

    I've tired, but I can't seem to do it right. Is there any other script I have to use?

    Thanks in advance

  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

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
    
    //*****************************************
    // Blending Image Slide Show Script- 
    // © Dynamic Drive (www.dynamicdrive.com)
    // For full source code, visit http://www.dynamicdrive.com/
    // Modified for mouseover action and Opera 9 compliance in
    // http://www.dynamicdrive.com/forums by jscheuer1
    //*****************************************
    
    //specify interval between slide (in mili seconds)
    var slidespeed=3000
    
    //specify images
    var slideimages=new Array("image1.gif","image2.gif","image3.gif")
    
    //specify corresponding links
    var slidelinks=new Array("http://www.dynamicdrive.com","http://javascriptkit.com","http://www.geocities.com")
    
    var newwindow=1 //open links in new window? 1=yes, 0=no
    
    var imageholder=new Array()
    for (i=0;i<slideimages.length;i++){
    imageholder[i]=new Image()
    imageholder[i].src=slideimages[i]
    }
    
    function gotoshow(){
    if (newwindow)
    window.open(slidelinks[whichlink])
    else
    window.location=slidelinks[whichlink]
    }
    
    </script>
    </head>
    <body>
    <a href="javascript:gotoshow()" onmouseover="slideit();"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>
    
    <script type="text/javascript">
    
    var whichlink=0
    var whichimage=0
    var blenddelay=(document.images.slide.filters)? document.images.slide.filters[0].duration*1000 : 0
    function slideit(){
    whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
    if (!document.images) return
    if (document.images.slide.filters) document.images.slide.filters[0].apply()
    document.images.slide.src=imageholder[whichimage].src
    if (document.images.slide.filters) document.images.slide.filters[0].play()
    whichlink=whichimage
    }
    
    </script>
    
    <p align="center"><font face="arial" size="-2">This free script provided by<br>
    <a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
    </body>
    </html>
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Aaahh thank you! That's actually working! THANKS

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
  •