PDA

View Full Version : image slideshow and Firefox



amazonize
12-08-2007, 02:19 PM
1) Script Title: Left-Right image slideshow Script

2) Script :

<script language="JavaScript1.2">
<!-- Begin
//largeur du curseur (en pixels)
var sliderwidth=525
//hauteur du curseur (Netscape)
var sliderheight=205
//vitesse de défilement
var slidespeed=3

//les images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="Images_site/diapo10_g.jpg "target="blank" title="Anavilhanas, Amazonie (© amazonize)"><img src="Images_site/diapo10_m.jpg" border=0></a>'
leftrightslide[1]='<a href="Images_site/diapo11_g.jpg "target="blank" title="Anavilhanas, Amazonie (© amazonize)"><img src="Images_site/diapo11_m.jpg" border=0></a>'
leftrightslide[2]='<a href="Images_site/diapo12_g.jpg "target="blank" title="Novo Airão, Rio Negro, Amazonie (© amazonize)"><img src="Images_site/diapo12_m.jpg" border=0></a>'
leftrightslide[3]='<a href="Images_site/diapo1_g.jpg "target="blank" title="Presidente Figuereido, grottes (© amazonize)"><img src="Images_site/diapo1_m.jpg" border=0></a>'
leftrightslide[4]='<a href="Images_site/diapo9_g.jpg "target="blank" title="Port de Manaus (© amazonize)"><img src="Images_site/diapo9_m.jpg" border=0></a>'
leftrightslide[5]='<a href="Images_site/diapo2_g.jpg "target="blank" title="Port de Manaus (© amazonize)"><img src="Images_site/diapo2_m.jpg" border=0></a>'
leftrightslide[6]='<a href="Images_site/diapo3_g.jpg "target="blank" title="Manaus, vieux marché couvert (© amazonize)"><img src="Images_site/diapo3_m.jpg" border=0></a>'
leftrightslide[7]='<a href="Images_site/diapo4_g.jpg "target="blank" title="Dans les rues de Manaus (© amazonize)"><img src="Images_site/diapo4_m.jpg" border=0></a>'
leftrightslide[8]='<a href="Images_site/diapo5_g.jpg "target="blank" title="Teatro Amazonas, Manaus (© amazonize)"><img src="Images_site/diapo5_m.jpg" border=0></a>'
leftrightslide[9]='<a href="Images_site/diapo6_g.jpg "target="blank" title="Dans les rues de Manaus (© amazonize)"><img src="Images_site/diapo6_m.jpg" border=0></a>'
leftrightslide[10]='<a href="Images_site/diapo7_g.jpg "target="blank" title="Près du port de Manaus (© amazonize)"><img src="Images_site/diapo7_m.jpg" border=0></a>'
leftrightslide[11]='<a href="Images_site/diapo8_g.jpg "target="blank" title="Sur le port de Manaus (© amazonize)"><img src="Images_site/diapo8_m.jpg" border=0></a>'

/*
dynamicdrive.com
*/
///////Ne rien modifier sous cette ligne////////////////////////////////////

var copyspeed=slidespeed
for (i=0;i<leftrightslide.length;i++)
finalslide=finalslide+leftrightslide[i]+"&nbsp;&nbsp;"

if (document.all){
document.write('<marquee id="ieslider" scrollAmount=0 style="width:'+sliderwidth+'">'+finalslide+'</marquee>')
ieslider.onmouseover=new Function("ieslider.scrollAmount=0")
ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=slidespeed")
}

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
document.ns_slider01.visibility="show"
setTimeout("window.onresize=regenerate",450)
intializeleftrightslide()
}
if (document.all)
ieslider.scrollAmount=slidespeed
}

function intializeleftrightslide(){
document.ns_slider01.document.ns_slider02.document.write('<nobr>'+finalslide+'</nobr>')
document. ns_slider01.document.ns_slider02.document.close()
thelength=document.ns_slider01.document.ns_slider02.document.width
scrollslide()
}

function scrollslide(){
if (document.ns_slider01.document.ns_slider02.left>=thelength*(-1)){
document.ns_slider01.document.ns_slider02.left-=slidespeed
setTimeout("scrollslide()",100)
}
else{
document.ns_slider01.document.ns_slider02.left=sliderwidth
scrollslide()
}
}
window.onload=regenerate2

// End -->
</script>
<ilayer width=&{sliderwidth}; height=&{sliderheight}; name="ns_slider01" visibility=hide>
<layer name="ns_slider02" onMouseover="slidespeed=0;" onMouseout="slidespeed=copyspeed"></layer>
</ilayer>


3) Describe problem: This script do not work with Firefox. I dont know why...

for viewing the page :

http://www.amazonize.com/amazonize.com/index_diapo.html


Thank's for help !

jscheuer1
12-08-2007, 04:36 PM
That's not an official Dynamic Drive Script, though it looks sort of like one:

http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

which will work in FF. As will this one, which is better suited to images:

http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm

amazonize
12-08-2007, 10:13 PM
Thank you very much, John, it's running with FF !!!!