Results 1 to 6 of 6

Thread: Blending Image Slideshow Script not working

  1. #1
    Join Date
    Oct 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Blending Image Slideshow Script not working

    1) Script Title: Blending Image Slideshow Script

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

    3) Describe problem:
    I am trying to add my pictures into the script but I am not sure how to associate them. In the example they have the images titled:image1.gif","image2.gif","image3.gif

    Mine are titled like: "truck.jpeg", "main_front.jpeg", etc.
    I guess my main question is where should my image files be located? I just have them in the same folder(on my computer) as my index file.
    How do I get it so that the script knows where to find my files?

    Thanks for you help.

    rjneuzel

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    It pretty much doesn't matter where you place them (directory wise), as long as you reference them in the script (on this line in the code):

    Code:
    var slideimages=new Array("truck.jpeg","main_front.jpeg")
    and also on this line (the first image listed in the array above):

    Code:
    <a href="javascript:gotoshow()"><img src="truck.jpeg" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Oct 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, for some reason that still didn't work. I will copy the html script below. I'm sure I am just missing something easy.

    Thanks for your help!
    rjneuzel

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title><br>
    <script language="JavaScript1.1">
    <!--

    //*****************************************
    // Blending Image Slide Show Script-
    // Dynamic Drive (www.dynamicdrive.com)
    // For full source code, visit http://www.dynamicdrive.com/
    //*****************************************

    //specify interval between slide (in mili seconds)
    var slidespeed=3000

    //specify images
    var slideimages=new Array("truck.jpeg","main_front")

    //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()
    var ie=document.all
    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>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body><br>
    <a href="javascript:gotoshow()"><img src="truck.jpeg","main_front.jpeg" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

    <script language="JavaScript1.1">
    <!--

    var whichlink=0
    var whichimage=0
    var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
    function slideit(){
    if (!document.images) return
    if (ie) document.images.slide.filters[0].apply()
    document.images.slide.src=imageholder[whichimage].src
    if (ie) document.images.slide.filters[0].play()
    whichlink=whichimage
    whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
    setTimeout("slideit()",slidespeed+blenddelay)
    }
    slideit()

    //-->
    </script>



    </body>
    </html>

  4. #4
    Join Date
    Oct 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Any help would be appriciated.
    Thank you!
    rjneuzel

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    In the code you posted above, shouldn't this (the part in red):

    Code:
    var slideimages=new Array("truck.jpeg","main_front")
    be this:

    Code:
    var slideimages=new Array("truck.jpeg","main_front.jpeg")
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Oct 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK. call me an idiot. I didn't save it before previewed it in the browser. I feel foolish!!! Thanks so much for your help!!!

    rjneuzel

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
  •