how do i get pictures to change on a timed setting?

G

Guest

i want a picture to apear in the corner as a nifty graphic and i want it to
change to another picture every few seconds, and i want it to keep changing
to other pictures that i have set up in a directory.
 
S

Steve Easton

Google for: javascript slide show



--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
K

KatrinaLouisiana.us

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/

gSlideshowInterval = 5;

gNumberOfImages = 4;

gImages = new Array(gNumberOfImages);

gImages[0] = "imagescajun/image1.jpg";

gImages[1] = "imagescajun/image2.jpg";

gImages[2] = "imagescajun/image3.jpg";

gImages[3] = "imagescajun/image4.jpg";

function canManipulateImages() {

if (document.images)

return true;

else

return false;

}

function loadSlide(imageURL) {

if (gImageCapableBrowser) {

document.slide.src = imageURL;

return false;

}

else {

return true;

}

}

function nextSlide() {

gCurrentImage = (gCurrentImage + 1) % gNumberOfImages;

loadSlide(gImages[gCurrentImage]);

}

gImageCapableBrowser = canManipulateImages();

gCurrentImage = 0;

setInterval("nextSlide()",gSlideshowInterval * 1000);

// -->

</SCRIPT>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top