View Full Version : auto scroll horizontal images

12-01-2006, 11:47 AM
I searched a lot for this but couldn't find the right thing. Can anyone tell me about any Image scroller with dynamic effects??? Links or examples ?

12-02-2006, 12:17 AM
I'm not sure if this what you're looking for, but it will scroll an image horizontally across the page. You can change the speed by modifying the numbers in bold.

window.onload = window.setInterval(test,50);

function test() {
var img = document.getElementById('moveImage');
var pos = parseInt(img.style.left);
var width = parseInt(img.style.width);
if ((pos+width)<0) {
img.style.left = (window.outerWidth-10)+'px';
} else {
img.style.left = (pos-5)+'px';
<img id="moveImage" src="http://codingforums.com/images/buttons/reply.gif" style="position:absolute; left:10px; top:10px; height:90px; width:250px;">