Hi,
I have a slideshow script that changes images using mouseovers. Basically I have 4 images that I want to change when a user mouses over the image. The only way I could get it to work was by using 4 scripts (same script for each image with changes to the variable names). Ideally I could make this work with on script (rather than 4).
Any ideas?
it's URL is:
The script code is as follows:
myPix = new Array("images/stripes_sd.gif","images/stripes_up.gif"
thisPic = 0
imgCt = myPix.length -1
function Next(direction){
if (document.images){
thisPic = thisPic+direction
if (thisPic > imgCt){
thisPic = 0
}
if (thisPic < 0){
thiPic = imgCt
}
document.up1.src=myPix[thisPic]
}
}
Thanks,
Ira
I have a slideshow script that changes images using mouseovers. Basically I have 4 images that I want to change when a user mouses over the image. The only way I could get it to work was by using 4 scripts (same script for each image with changes to the variable names). Ideally I could make this work with on script (rather than 4).
Any ideas?
it's URL is:
The script code is as follows:
myPix = new Array("images/stripes_sd.gif","images/stripes_up.gif"
thisPic = 0
imgCt = myPix.length -1
function Next(direction){
if (document.images){
thisPic = thisPic+direction
if (thisPic > imgCt){
thisPic = 0
}
if (thisPic < 0){
thiPic = imgCt
}
document.up1.src=myPix[thisPic]
}
}
Thanks,
Ira