Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rollover Slideshow

Status
Not open for further replies.

iralh

Programmer
Sep 20, 2001
12
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top