if you wanna slow it down increase the number in:
Code:
setInterval("RotateImages()",250); // 250 = 1/4 of a second
//1000 = 1 second
//5000 = 5 seconds.
you could also add a stop button:
Code:
<script>
var Counter = 0;
var images = new Array()
images[0]="image1.jpg"
images[1]="image2.jpg"
images[2]="image3.jpg"
images[3]="image4.jpg"
images[4]="image5.jpg"
var animation = setInterval("RotateImages()",250);
function RotateImages(){
document.images[0].src = images[Counter];
Counter++;
if(Counter >= images.length) { Counter=0; }
};
</script>
<img src="image1.jpg">
<input type=button value=stop onclick="clearInterval(animation);">
Bookmarks