Well for Ultimate fade, use these instructions:
To preserve the multiple shows feature of this script and have an option for any given one to stop after a specified number of times through, make these modifications -
to the function 'fadeshow' (additions red):
Code:
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, times, displayorder){
this.flag = 0;
this.times = times;
this.pausecheck=pause
this.mouseovercheck=0
. . .
to the function 'fadepic' (near its end):
Code:
. . .
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
if(obj.flag && obj.flag === obj.times)
return;
if(obj.times && obj.nextimageindex === obj.postimages.length - 1)
++obj.flag;
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
Now the syntax for invoking any given slideshow instance has an added parameter - 'times':
Code:
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), times (0=continuous, #=number of times), optionalRandomOrder)
new fadeshow(fadeimages, 140, 225, 0, 3000, 1, 1, "R")
</script>
In the above example, the slideshow invoked will stop at the last image. If the red
1 were set to 0, it would run continuously. Use
2 for two times, etc.
Bookmarks