Results 1 to 6 of 6

Thread: Help, i need somebody, Help

  1. #1
    Join Date
    Nov 2005
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help, i need somebody, Help

    I want to thank those who helped me with my flexi script code...but one question....i was wondering .. i have 8 flexi slideshows on one page...now, the fisrt picture in the variableslide will show up in basically all the slideshows...but only 2 will actually "run", on the the others it seems the first picture stalls and stays there...can anyone tell me why..if you need my code...let me know but i was thinking this might be a simple question...

  2. #2
    Join Date
    Feb 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Could it be that you have *eight* of the same scripts running on the same page?

  3. #3
    Join Date
    Nov 2005
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah, but according to people on here in threads ect...you can have as many as you want...as long as the id ,var and function names were different

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's true. However, you have to be aware that the browser does not always have unlimited memory available to it. That could be the problem in this case; the other thing I'd suspect is that you've missed an element/function/variable name somewhere, or have changed them inconsistently within the same copy of the script.

    vikenk: Love the tone of mild incredulity at "eight"
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Feb 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    It's true. However, you have to be aware that the browser does not always have unlimited memory available to it.

    vikenk: Love the tone of mild incredulity at "eight"
    Yes....Mild would be the right word... :>)

    jmayle,

    In theory you can have unlimited scripts on the same page, but it doesn't necessarily mean that the browser will run them smoothly. Try removing one script at a time and see if reducing the number of scripts will make them run faster.

    Remember, running a slideshow script makes the processor work; running eight of them means the processor must try to smoothly run all of them at the same time, and the browser only has a certain amount of memory and processor time devoted to it.


    Viken K.

  6. #6
    Join Date
    Nov 2005
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default heres my code..

    <!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=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    #Layer1 {
    position:absolute;
    left:341px;
    top:268px;
    width:184px;
    height:189px;
    z-index:1;
    }
    #Layer2 {
    position:absolute;
    left:15px;
    top:50px;
    width:192px;
    height:189px;
    z-index:2;
    }
    #Layer3 {
    position:absolute;
    left:233px;
    top:50px;
    width:195px;
    height:190px;
    z-index:3;
    }
    #Layer4 {
    position:absolute;
    left:455px;
    top:50px;
    width:182px;
    height:192px;
    z-index:4;
    }
    #Layer5 {
    position:absolute;
    left:451px;
    top:50px;
    width:189px;
    height:184px;
    z-index:4;
    }
    #Layer6 {
    position:absolute;
    left:454px;
    top:51px;
    width:204px;
    height:183px;
    z-index:4;
    }
    -->
    </style>
    </head>

    <body onload="if (document.layers){start_slider1();start_slider2();start_slider0()}">
    <div id="Layer2">
    <script type="text/javascript">

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

    var variableslide01=new Array()

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

    variableslide01[0]=['photo1.jpg', '', '']
    variableslide01[1]=['photo2.jpg', 'http://www.space.com', 'Has aliens landed on earth? You decide.']
    variableslide01[2]=['photo3.jpg', '', '']

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

    var slidewidth01='140px' //set to width of LARGEST image in your slideshow
    var slideheight01='275px' //set to height of LARGEST iamge in your slideshow, plus any text description
    var slidebgcolor01='#F3F3F3'

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

    ////Do not edit pass this line////////////////


    var ie=document.all
    var dom=document.getElementById

    for (i=0;i<variableslide01.length;i++){
    var cacheimage01=new Image()
    cacheimage01.src=variableslide01[i][0]
    }

    var currentslide01=0

    function rotateimages01(){
    contentcontainer='<center>'
    if (variableslide01[currentslide01][1]!="")
    contentcontainer+='<a href="'+variableslide01[currentslide01][1]+'">'
    contentcontainer+='<img src="'+variableslide01[currentslide01][0]+'" border="0" vspace="3">'
    if (variableslide01[currentslide01][1]!="")
    contentcontainer+='</a>'
    contentcontainer+='</center>'
    if (variableslide01[currentslide01][2]!="")
    contentcontainer+=variableslide01[currentslide01][2]

    if (document.layers){
    crossrotateobj.document.write(contentcontainer)
    crossrotateobj.document.close()
    }
    else if (ie||dom)
    crossrotateobj.innerHTML=contentcontainer
    if (currentslide01==variableslide01.length-1) currentslide01=0
    else currentslide01++
    setTimeout("rotateimages01()",slidedelay01)
    }

    if (ie||dom)
    document.write('<div id="slidedom1" style="width:'+slidewidth01+';height:'+slideheight01+'; background-color:'+slidebgcolor01+'"></div>')

    function start_slider1(){
    crossrotateobj=dom? document.getElementById("slidedom1") : ie? document.all.slidedom1 : document.slidensmain.document.slidenssub
    if (document.layers)
    document.slidensmain.visibility="show"
    rotateimages01()
    }

    if (ie||dom)
    start_slider1()

    </script>

    <ilayer id="slidensmain" width=&{slidewidth01}; height=&{slideheight01}; bgColor=&{slidebgcolor01}; visibility=hide><layer id="slidenssub" width=&{slidewidth01}; left=0 top=0></layer></ilayer>

    <p align="center">&nbsp;</p>
    </div>
    <div id="Layer3">
    <script type="text/javascript">

    /***********************************************
    * 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]=['photo4.jpg', '', '']
    variableslide[1]=['photo5.jpg', 'http://www.space.com', 'Has aliens landed on earth? You decide.']
    variableslide[2]=['photo6.jpg', '', '']

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

    var slidewidth='140px' //set to width of LARGEST image in your slideshow
    var slideheight='275px' //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////////////////

    for (i=0;i<variableslide.length;i++){
    var cacheimage=new Image()
    cacheimage.src=variableslide[i][0]
    }

    var currentslide=0

    function rotateimages(){
    contentcontainer2='<center>'
    if (variableslide[currentslide][1]!="")
    contentcontainer2+='<a href="'+variableslide[currentslide][1]+'">'
    contentcontainer2+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
    if (variableslide[currentslide][1]!="")
    contentcontainer2+='</a>'
    contentcontainer2+='</center>'
    if (variableslide[currentslide][2]!="")
    contentcontainer2+=variableslide[currentslide][2]

    if (document.layers){
    crossrotateobj2.document.write(contentcontainer2)
    crossrotateobj2.document.close()
    }
    else if (ie||dom)
    crossrotateobj2.innerHTML=contentcontainer2
    if (currentslide==variableslide.length-1) currentslide=0
    else currentslide++
    setTimeout("rotateimages()",slidedelay)
    }

    if (ie||dom)
    document.write('<div id="slidedom2" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')

    function start_slider2(){
    crossrotateobj2=dom? document.getElementById("slidedom2") : ie? document.all.slidedom2 : document.slidensmain.document.slidenssub
    if (document.layers)
    document.slidensmain.visibility="show"
    rotateimages()
    }

    if (ie||dom)
    start_slider2()


    </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">&nbsp;</p>
    </div>
    <div id="Layer6"><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 variableslide0=new Array()

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

    variableslide0[0]=['ball.gif', '', '']
    variableslide0[1]=['spaceship.gif', 'http://www.space.com', 'Has aliens landed on earth? You decide.']
    variableslide0[2]=['cake.gif', '', '']

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

    var slidewidth0='130px' //set to width of LARGEST image in your slideshow
    var slideheight0='120px' //set to height of LARGEST iamge in your slideshow, plus any text description
    var slidebgcolor0='#F3F3F3'

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

    ////Do not edit pass this line////////////////




    for (i=0;i<variableslide0.length;i++){
    var cacheimage0=new Image()
    cacheimage0.src=variableslide0[i][0]
    }

    var currentslide0=0

    function rotateimages0(){
    contentcontainer='<center>'
    if (variableslide0[currentslide0][1]!="")
    contentcontainer+='<a href="'+variableslide0[currentslide0][1]+'">'
    contentcontainer+='<img src="'+variableslide0[currentslide0][0]+'" border="0" vspace="3">'
    if (variableslide0[currentslide0][1]!="")
    contentcontainer+='</a>'
    contentcontainer+='</center>'
    if (variableslide0[currentslide0][2]!="")
    contentcontainer+=variableslide0[currentslide0][2]

    if (document.layers){
    crossrotateobj.document.write(contentcontainer)
    crossrotateobj.document.close()
    }
    else if (ie||dom)
    crossrotateobj.innerHTML=contentcontainer
    if (currentslide0==variableslide0.length-1) currentslide0=0
    else currentslide0++
    setTimeout("rotateimages0()",slidedelay0)
    }

    if (ie||dom)
    document.write('<div id="slidedom0" style="width:'+slidewidth0+';height:'+slideheight0+'; background-color:'+slidebgcolor0+'"></div>')

    function start_slider0(){
    crossrotateobj=dom? document.getElementById("slidedom0") : ie? document.all.slidedom0 : document.slidensmain.document.slidenssub
    if (document.layers)
    document.slidensmain.visibility="show"
    rotateimages0()
    }

    if (ie||dom)
    start_slider0()
    else if (document.layers)


    </script>

    <ilayer id="slidensmain" width=&{slidewidth0}; height=&{slideheight0}; bgColor=&{slidebgcolor0}; visibility=hide><layer id="slidenssub" width=&{slidewidth0}; left=0 top=0></layer></ilayer>

    <p align="center">&nbsp;</p>

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
  •