|
Below is a script I have for a simple cross fade slideshow, however, I would like it to play only one time. I also would like to have the cross fade effect viewable in all browsers. Also...I would like the second image to be an image map. My questions: How/where do I make the change to make it play one time? How can I change it to make the fade viewable in all browsers? Is it possible to have the second image an image map, and if so, is it as simple as attaching the "use map..." line of code ?
Thank you!
<head>
<script>
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000
// Duration of crossfade (seconds)
var crossFadeDuration = 10
// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'fireanimation.gif'
Pic[1] = 'home.gif'
var t
var j = 0
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)
}
</script>
</head>
<body onload="runSlideShow()">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="VU" height=450 width=304>
<img src="fireanimation.gif" name='SlideShow' width=450 height=304></td>
</tr>
</table>
</body>
|