Results 1 to 3 of 3

Thread: background slideshow (left to right)

  1. #1
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default background slideshow (left to right)

    below is a background slideshow I found, but how could I make it slide from left to right instead of fading in/out?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>

    <style>
    body{
    /*Remove below line to make bgimage NOT fixed*/
    background-attachment:fixed;
    background-repeat: no-repeat;
    /*Use center center in place of 300 200 to center bg image*/
    background-position: 300 200;
    }
    </style>

    <script language="JavaScript1.2">

    //Background Image Slideshow- Dynamic Drive (www.dynamicdrive.com)
    //For full source code, 100's more DHTML scripts, and TOS,
    //visit http://www.dynamicdrive.com

    //Specify background images to slide
    var bgslides=new Array()
    bgslides[0]=["01.jpg", "01.html", "_self"]
    bgslides[1]=["02.jpg", "02.html", "_self"]
    bgslides[2]=["03.jpg", "03.html", "_self"]
    bgslides[3]=["04.jpg", "04.html", "_self"]


    //Specify interval between slide (in miliseconds)
    var speed=4000

    //preload images
    var processed=new Array()
    for (i=0;i<bgslides.length;i++){
    processed[i]=new Image()
    processed[i].src=bgslides[i]
    }

    var inc=-1

    function slideback(){
    if (inc<bgslides.length-1)
    inc++
    else
    inc=0
    document.body.background=processed[inc].src
    }

    if (document.all||document.getElementById)
    window.onload=new Function('setInterval("slideback()",speed)')

    </script>


    </head>

    <body>
    </body>
    </html>

  2. #2
    Join Date
    Feb 2008
    Posts
    63
    Thanks
    2
    Thanked 8 Times in 8 Posts

    Default

    If you look at all of the slide shows here at Dynamicdrive you will find what you are looking for.
    Sandy K

  3. #3
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    ya, I found one that moves from left to right, and one for background slideshow, but I have trouble combine them together. I hope someone could help me with that, 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
  •