Hola. Estoy haciendo una pagina y puse dos scripts, uno para rotar una imagen en el lugar, y otro para hacer un desplazamiento de varias imagenes. Los dos por separado funcionan perfectamente, pero al ponerlos juntos, me funciona uno solo.
estos son los codigos
<script language="JavaScript1.1">
var specifyimage=new Array()
specifyimage[0]="supply.gif"
specifyimage[1]="bandera_maga.gif"
specifyimage[2]="supply.gif"
specifyimage[3]="bandera_maga.gif"
var delay=1000
//Counter for array
var count =1;
var cubeimage=new Array()
for (i=0;i<specifyimage.length;i++){
cubeimage[i]=new Image()
cubeimage[i].src=specifyimage[i]
}
function movecube(){
if (window.createPopup)
cube.filters[0].apply()
document.images.cube.src=cubeimage[count].src;
if (window.createPopup)
cube.filters[0].play()
count++;
if (count==cubeimage.length)
count=0;
setTimeout("movecube()",delay)
}
window.onload=new Function("setTimeout('movecube()',delay)")
</script>
<img src="supply.gif" name="cube" border=0 style="filter:progid:DXImageTransform.Microsoft.St retch(stretchStyle='PUSH')" width="80" height="79">
y este es el otro, para desplazamiento:
<script language="JavaScript1.2">
<!--
var sliderwidth=400
var sliderheight=150
var slidespeed=5
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<img src="tele.jpg" border=0>'
leftrightslide[1]='<img src="estufa.gif" border=0 >'
leftrightslide[2]='<img src="minicomp.gif" border=0 >'
leftrightslide[3]='<img src="microondas.gif" border=0 >'
leftrightslide[4]='<img src="mesa.gif" border=0 >'
leftrightslide[5]='<img src="lavadora.gif" border=0 >'
var copyspeed=slidespeed
for (i=0;i<leftrightslide.length;i++)
finalslide=finalslide+leftrightslide[i]+" "
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_slider0 2.document.width
scrollslide()
}
function scrollslide(){
if (document.ns_slider01.document.ns_slider02.left>=t helength*(-1)){
document.ns_slider01.document.ns_slider02.left-=slidespeed
setTimeout("scrollslide()",100)
}
else{
document.ns_slider01.document.ns_slider02.left=sli derwidth
scrollslide()
}
}
window.onload=regenerate2
//-->
</script>
<ilayer width=&{sliderwidth}; height=&{sliderheight}; name="ns_slider01" visibility=hide>
<layer name="ns_slider02" onMouseover="slidespeed=0;" onMouseout="slidespeed=copyspeed">
</layer>
</ilayer>
<p align="center" style="margin-top: 0; margin-bottom: 0">
Ayudenme plis, esto me tiene de cabeza