Not precisely. You could include the mouseover images there, like so:
Code:
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["photo1.jpg", "", "", "photo1_over.jpg"]
fadeimages[1]=["photo2.jpg", "http://www.cssdrive.com", "", "photo2_over.jpg"]
fadeimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new", "photo3_over.jpg"]
But that would just be the beginning. Like any other mouseover images, they would need to be preloaded. Here would be a good place:
Code:
. . . tion() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
this.overimages=new Array() //preload mouseover images
for (var o=0;o<theimages.length;o++)
if(theimages[o][3]){
this.overimages[o]=new Image()
this.overimages[o].src=theimages[o][3]
}
Then mouseover/mouseout code would need to be added here:
Code:
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
if (this.theimages[picindex][3])
slideHTML+='<img src="'+this.postimages[picindex].src+'" onmouseover="this.src=\''+this.overimages[picindex].src+'\';" onmouseout="this.src=\''+this.postimages[picindex].src+'\';" border="'+this.imageborder+'">'
else
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
Bookmarks