 |
Slide
show
demonstration
Slideshow
script
Credits
|
|
Sample
Javascript Slide
Show
This slideshow script, unlike most others, will preload its images one at a time, while the preceding image is being shown. The script will actually
wait until the next image is successfully preloaded before continuing. This script
is useful if your slideshow contains many large images, and you don't want your visitors to wait
for a long period of time before being able to see the slide.
|
S L
I D E S H O W D E M O N S T R A T I O N |
Bryce Canyon, Utah
|
S L
I D E S H O W S C R I P T |
Add the following code in the page <BODY> where you
want the slideshow to appear. Configure the names and location of the images
and the amount of time
each image will appear.
<SCRIPT LANGUAGE="JavaScript">
<!--
/*
Script by FPMC at http://jsarchive.8m.com
Submitted to Website Abstraction (http://wsabstract.com)
*/
//set image paths
src = ["images/bryce1.jpg",
"images/bryce2.jpg",
"images/bryce3.jpg",
"images/bryce4.jpg",
"images/bryce5.jpg",
"images/bryce6.jpg",
"images/bryce7.jpg"]
//set corresponding urls
url = ["http://www.west.asu.edu/achristie/", "http://www.west.asu.edu/achristie/", "http://www.west.asu.edu/achristie/", "http://www.west.asu.edu/achristie/", "http://www.west.asu.edu/achristie/", "http://www.west.asu.edu/achristie/", "http://www.west.asu.edu/achristie/"]
//set duration for each image
duration = 4;
//Please do not edit below
ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
}
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout("switchAd()",duration*1000);
}
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)
switchAd();
}
//-->
</SCRIPT>
<IMG NAME="Ad_Image" SRC="image1.gif" BORDER=0>
Photographs courtesy of Dr. Alice Christie
Script by FPMC at http://jsarchive.8m.com
Submitted to Website Abstraction
(http://wsabstract.com)
|