...

View Full Version : auto scroll horizontal images



Uzair
12-01-2006, 10: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 ?

j9ine
12-01-2006, 11:17 PM
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.



<html>
<head>
<script>
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';
}
}
</script>
</head>
<body>
<img id="moveImage" src="http://codingforums.com/images/buttons/reply.gif" style="position:absolute; left:10px; top:10px; height:90px; width:250px;">
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum