View Full Version : Image Arrays
trish1206
09-10-2001, 01:08 PM
Hi there. Just looking for an easy script
to scroll through a bunch of images.
I dont want a jumping billboard or anything
fancy. I just want an array of images to
scroll thru.
Any ideas anyone? I know this has to
be easy.
trish1206
09-10-2001, 02:06 PM
Okay I got an image array cycle script.
But it stops on the last image and I
would like it to return to the first
and continue rotating.
Here is the script:
<SCRIPT LANGUAGE="JavaScript">
<!--
//set image paths
src = ["images/standing_blur.jpg", "images/outdoors.jpg", "images/jill_desk.jpg", "images/wall_plaques.jpg", "images/bed_lying_lights.jpg", "images/mirror.jpg",]
//duration for each image
duration = 4;
//
ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
}
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout("switchAd()",duration*1000);
}
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)
switchAd();
}
//-->
</SCRIPT>
<A HREF="javascript:doLink();" return true;"
onMouseOut="status=''"> <img name="Ad_Image" src="images/standing_blur.jpg" width="400" height="300" border=0></A>
</td>
</tr>
</table>
Any ideas?
petervazed
09-10-2001, 06:51 PM
Try this one.
Images keep on moving :rocker:
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.