Results 1 to 3 of 3

Thread: Flexi slideshow

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

    Question Flexi slideshow

    I have tried to use the flexi slideshow http://dynamicdrive.com/dynamicindex14/index.html

    I try to replace the images in the array with my own images, excepting the middle one, and all I get is a weird scripting, and then is replaced by the words 'have the aliens landed yet, you decide?' Obviously the text from variableslide[1]

    I am trying to get it to work in dreamweaver 8. I use Firefox to view the pages.

    Here is a copy from my page in Dreamweaver.

    Any Help

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>

    <body>

    <script language="JavaScript1.2">

    /***********************************************
    * Flexi Slideshow- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for use
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/

    var variableslide=new Array()

    //variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]

    variableslide[0]=['<img src="Slideshow picts/picts/altice 10.jpg">','so is this here?']
    variableslide[1]=['spaceship.gif', 'http://www.space.com', 'Has aliens landed on earth? You decide.']
    variableslide[2]=['<img src="Slideshow picts/picts/altice 2.jpg">']

    //configure the below 3 variables to set the dimension/background color of the slideshow

    var slidewidth='760px' //set to width of LARGEST image in your slideshow
    var slideheight='800px' //set to height of LARGEST iamge in your slideshow, plus any text description
    var slidebgcolor='#F3F3F3'

    //configure the below variable to determine the delay between image rotations (in miliseconds)
    var slidedelay=3000

    ////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 (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

    </script>

    <ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgColor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth}; left=0 top=0></layer></ilayer>

    <p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
    <a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
    </body>
    </html>

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Replace the following code segment in your source code

    Code:
    variableslide[0]=['<img src="Slideshow picts/picts/altice 10.jpg">','so is this here?']
    variableslide[1]=['spaceship.gif', 'http://www.space.com', 'Has aliens landed on earth? You decide.']
    variableslide[2]=['<img src="Slideshow picts/picts/altice 2.jpg">']
    problamatic lines are in red color.

    You don't have to specify the <img> tag within the array just name your image file along with its correct path

    for example:

    Code:
    variableslide[0]=['1.jpg','','so is this here?']
    variableslide[1]=['3.gif', '', 'Has aliens landed on earth? You decide.']
    variableslide[2]=['2.jpg','','hello']
    In the above code 1.jpg, 3.gif and 2.jpg files are stored in the same folder where i've stored flexi slide show web page.

    You can find the difference in your code and the one I've mentioned here.

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

    Default

    Thanks!

    Answers are so easy when you know them;

    So difficult when you do not.

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
  •