Question:
[B]What needs to be changed to make the images scroll in a continuous loop with no space between the first and last image.
[SIZE=2]to view example:
[URL=http://www.standupjetski.com/jeffindex.htm]http://www.standupjetski.com/jeffindex.htm
The code I placed in the head is
[code=html]<title>Image Scroller</title>
<script type=”text/javascript”>
var imageURLs = new Array(); //array to store the image urls
/* * PUT YOUR IMAGES HERE * */
imageURLs[0]=”jeffbanshee.jpg”;
imageURLs[1]=”jeffoctane.jpg”;
imageURLs[2]=”jefffusion.jpg”;
imageURLs[3]=”jefftrx450r.jpg”;
imageURLs[4]=”jeffcrf450x.jpg”;
imageURLs[5]=”jeffsuperjet.jpg”;
imageURLs[6]=”jefff7.jpg”;
imageURLs[7]=”jeff650.jpg”;
imageURLs[8]=”jeffrxp.jpg”;
imageURLs[9]=”jeff3d.jpg”;
imageURLs[10]=”jeffsxr.jpg”;
imageURLs[11]=”jeffyzf450f.jpg”;
var delay = 50; //tume in ms between change of position
var move = 2; //how far does it move at once
var imheight=50;
function init() {
var imgstr=””;
for(var i=0; i<imageURLs.length; i++) {
imgstr+=(“<td><img id=’scrim”+i+”‘ src='”+imageURLs[i]+”‘ height='”+imheight+”px’/></td>”);
}
document.write(“<div id=’imov’ style=’position:absolute;top:0′><table><tr>”
+imgstr
+”</tr></table></div>”);
}
function scroll() {
var imd = document.getElementById(“imov”);
if(imd.style.right.substring(0, imd.style.right.indexOf(‘p’))<=(-imd.offsetWidth)) {
imd.style.right=(screen.width-20)+”px”;
}
imd.style.right=(imd.style.right.substring(0, imd.style.right.indexOf(‘p’))-move)+”px”;
setTimeout(“scroll()”, delay);
}
init();
</script>
Thanks in advance for any help.
Andrew