KUsTexasGirl
02-16-2003, 05:41 AM
I found a script at javascriptkit.com for an onMouseover Slideshow. It is working, but only partially. Here is the script:
<HEAD>
<script>
/*Rollover effect on different image script-
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("slidezero.jpg","slide1.jpg","slide2.jpg","slide3.jpg","slide4.jpg","slide5.jpg","slide6.jpg","slide7.jpg","slide8.jpg","slide9.jpg","slide10.jpg","slide11.jpg","slide12.jpg","slide13.jpg","slide14.jpg","slide15.jpg","slide16.jpg","slide17.jpg","slide18.jpg","slide19.jpg","slide20.jpg","slide21.jpg","slide22.jpg")
</script>
</HEAD
As I stated above, the script works, but only on the first 5 links. The example at javascriptkit.com is for 5 images. I have poured over the script, but I cannot see anything I need to edit for it to work with more images. Could someone please take a look at the script & tell me if there is anything I need to edit? Any tips on this are GREATLY appreciated. Thanks for your time.
<HEAD>
<script>
/*Rollover effect on different image script-
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("slidezero.jpg","slide1.jpg","slide2.jpg","slide3.jpg","slide4.jpg","slide5.jpg","slide6.jpg","slide7.jpg","slide8.jpg","slide9.jpg","slide10.jpg","slide11.jpg","slide12.jpg","slide13.jpg","slide14.jpg","slide15.jpg","slide16.jpg","slide17.jpg","slide18.jpg","slide19.jpg","slide20.jpg","slide21.jpg","slide22.jpg")
</script>
</HEAD
As I stated above, the script works, but only on the first 5 links. The example at javascriptkit.com is for 5 images. I have poured over the script, but I cannot see anything I need to edit for it to work with more images. Could someone please take a look at the script & tell me if there is anything I need to edit? Any tips on this are GREATLY appreciated. Thanks for your time.