forse l'ho otimizzata ancora un po'...
mi funziona lo stesso senza la funzione di stop... ho aggiunto lo stop in pratica direttamente nelle funzioni di move...
a me funziona! Se vuoi prova anche te...
codice:<SCRIPT LANGUAGE="JavaScript"> <!-- n = (document.layers) ? 1:0 ie = (document.all) ? 1:0 larimg=2000 function init() { if (n) ImgBlock = document.ImageDiv if (ie) ImgBlock = ImageDiv.style if (n) W = parseInt(document.Mask.width) if (n) L = parseInt(document.Mask.left) if (ie) W = parseInt(Mask.style.width) if (ie) L = parseInt(Mask.style.left) marginRight = W+L /* margine destro del DIV contenitore */ ImgBlock.xpos = parseInt(ImgBlock.left) ImgBlock.active = 0 } function move_left() { if (ImgBlock.active) { if (ImgBlock.xpos > (L-(larimg-250))) { ImgBlock.xpos -= 5 ImgBlock.left = ImgBlock.xpos setTimeout("move_left()",30) } } } function move_right() { if (ImgBlock.active) { if (ImgBlock.xpos != 0) { ImgBlock.xpos += 5 ImgBlock.left = ImgBlock.xpos setTimeout("move_right()",30) } } } //--> </SCRIPT>
Ciao

 
			
			 
					
					
					
						 Rispondi quotando
  Rispondi quotando