Hello everybody.
I've this problem: I'm making a jpg moving horizontally from left to right in my page. I'd like to make it start moving from the left off-screen side. I tried using position negative values either defining the style of the img object and in the javascript function that produces the image movement, but it doesn't work
Anybody can turn on the light??
Thanks!
This is the Js File:
[/code]
Last edited by pavlov2002 on Fri Jul 20, 2007 3:32 am; edited 1 time in total
I've this problem: I'm making a jpg moving horizontally from left to right in my page. I'd like to make it start moving from the left off-screen side. I tried using position negative values either defining the style of the img object and in the javascript function that produces the image movement, but it doesn't work
Anybody can turn on the light??
Thanks!
This is the Js File:
| Code: |
| var timer1;
function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function Chip(chipname,width,height){ this.named=chipname; this.xx=(-495); this.yy=208; this.timer1=null; } function movechip(chipname){ if (document.getElementById){ eval("chip="+chipname); if (window.innerWidth || window.opera){ pageY=window.pageYOffset; pageH=window.innerHeight; } else if (document.body){ pageY=iecompattest().scrollTop; pageH=iecompattest().offsetHeight; } while(chip.xx<250){ chip.xx=chip.xx+5;} if (chip.xx<=420) { chip.xx=chip.xx+5; } else chip.xx=chip.xx; document.getElementById(chip.named).style.left=chip.xx+"px"; chip.timer1=setTimeout("movechip('"+chip.named+"')",50); } } |
Last edited by pavlov2002 on Fri Jul 20, 2007 3:32 am; edited 1 time in total
