Hi, I have this JS which roates 7 images every 3 seconds which works nicely as it fades in to the next image.
I'd like to alter the JS so that all the images are black and white but when the mouse goes over them they change to colour. The images are not links.
Also, when the mouse moves off I'd like it to go back to b&w.
Can someone help?
I understand I need a total of 14 images, 7 b&w and 7 colour but I don't know how to fit them in to the code above
I'd like to alter the JS so that all the images are black and white but when the mouse goes over them they change to colour. The images are not links.
Also, when the mouse moves off I'd like it to go back to b&w.
Code:
<!--
var slideShowSpeed = 3000
// Duration of crossfade (seconds)
var crossFadeDuration = 3
// Specify the image files
var Pic = new Array()
Pic[0] = 'images/img1.jpg'
Pic[1] = 'images/img2.jpg'
Pic[2] = 'images/img3.jpg'
Pic[3] = 'images/img4.jpg'
Pic[4] = 'images/img5.jpg'
Pic[5] = 'images/img6.jpg'
Pic[6] = 'images/img7.jpg'
// =======================================
//
// =======================================
var t
var j = 1
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Pic[i]
}
function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad[j].src
if (document.all){
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
//-->
Can someone help?
I understand I need a total of 14 images, 7 b&w and 7 colour but I don't know how to fit them in to the code above