Results 1 to 2 of 2

Thread: FLEXI Slideshow HELP

  1. #1
    Join Date
    May 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry FLEXI Slideshow HELP

    http://dynamicdrive.com/dynamicindex14/flexislide.htm


    ok the script is only written for 3 images and im add 5 all together. when i do that the code gets messy and keeps writting UNDEFINED so i need help with the bottom half i think is where the problems are accuring. thanks


    variableslide[0]=['images/newhomepage/forcesofnature_banner.gif', '', '']
    variableslide[1]=['images/newhomepage/vforvendet_banner.gif', '','']
    variableslide[2]=['images/newhomepage/sesamelarge_banner.gif', '','']
    variableslide[3]=['images/newhomepage/bodiesbanner_rotate.gif', '','']
    variableslide[4]=['images/newhomepage/spiderman_rotatebanner.gif', '','']
    variableslide[5]=['images/newhomepage/ridearoundworld_banner.gif', '','']
    //configure the below 3 variables to set the dimension/background color of the slideshow
    var slidewidth='450px' //set to width of LARGEST image in your slideshow
    var slideheight='550px' //set to height of LARGEST iamge in your slideshow, plus any text description
    var slidebgcolor='#ffffff' //background color
    //configure the below variable to determine the delay between image rotations (in miliseconds)
    var slidedelay=2000 //the speed
    ////Do not edit pass this line////////////////
    var ie=document.all
    var dom=document.getElementById
    for (i=0;i<variableslide.length;i++){
    var cacheimage=new Image()
    cacheimage.src=variableslide[i][0]
    }
    var currentslide=0
    function rotateimages(){
    contentcontainer='<center>'

    if (variableslide[currentslide][1]!="")
    contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
    contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'

    if (variableslide[currentslide][1]!="")
    contentcontainer+='</a>'
    contentcontainer+='</center>'

    if (variableslide[currentslide][2]!="")
    contentcontainer+=variableslide[currentslide][2]


    if (variableslide[currentslide][3]!="")
    contentcontainer+=variableslide[currentslide][3]


    if (variableslide[currentslide][4]!="")
    contentcontainer+=variableslide[currentslide][4]

    if (variableslide[currentslide][5]!="")
    contentcontainer+=variableslide[currentslide][5]

    if (document.layers){
    crossrotateobj.document.write(contentcontainer)
    crossrotateobj.document.close()
    }
    else if (ie||dom)
    crossrotateobj.innerHTML=contentcontainer
    if (currentslide==variableslide.length-1) currentslide=0
    else currentslide++
    setTimeout("rotateimages()",slidedelay)
    }
    if (ie||dom)
    document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')
    function start_slider(){
    crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
    if (document.layers)
    document.slidensmain.visibility="show"
    rotateimages()
    }
    if (ie||dom)
    start_slider()
    else if (document.layers)
    window.onload=start_slider

    //Easy as that!!
    </script>

  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

    Looks to me that you have way over thought this. The only thing you should need to do is configure the array and user variables:

    Code:
    var variableslide=new Array()
    
    //variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]
    
    variableslide[0]=['images/newhomepage/forcesofnature_banner.gif', '', '']
    variableslide[1]=['images/newhomepage/vforvendet_banner.gif', '','']
    variableslide[2]=['images/newhomepage/sesamelarge_banner.gif', '','']
    variableslide[3]=['images/newhomepage/bodiesbanner_rotate.gif', '','']
    variableslide[4]=['images/newhomepage/spiderman_rotatebanner.gif', '','']
    variableslide[5]=['images/newhomepage/ridearoundworld_banner.gif', '','']
    //configure the below 3 variables to set the dimension/background color of the slideshow
    var slidewidth='450px' //set to width of LARGEST image in your slideshow
    var slideheight='550px' //set to height of LARGEST iamge in your slideshow, plus any text description
    var slidebgcolor='#ffffff' //background color 
    //configure the below variable to determine the delay between image rotations (in miliseconds)
    var slidedelay=2000 //the speed
    ////Do not edit pass this line////////////////
    What part of ////Do not edit pass this line//////////////// didn't you understand? It means stop editing!
    - John
    ________________________

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

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
  •