|
|
Slideshow Of Pictures - Simple script | ||
Discussion by Chris Neutral with 0 Replies.
Last Update: July 8, 2005, 7:33 pm | |||
This is just a small script that lets you display a set of pictures in a slideshow-like manner. This script lets you show the thumbnailed versions of the pictures, and then when the user clicks on a pic, the user is taken to the actual picture.
NOTE: You can add more pictures to the array by copying the format that is being used in it:
<html>
<head>
<script language='Javascript' type='text/css'>
<!--
slideshow = new Array(
"images/image1.bmp", "images/image2.bmp",
"images/image3.bmp", "images/image4.bmp"
)
slideNumber = slideshow.length
slideCurrent = 0
function loadSlides()
{
document.slide.src = slideshow[slideCurrent]
}
function slideNext()
{
if(slideCurrent < slideNumber)
{
slideCurrent ++
document.slide.src = slideshow[slideCurrent]
}
else
{
slideCurrent = 0
document.slide.src = slideshow[slideCurrent]
}
}
function slidePrevious()
{
if(slideCurrent > 0)
{
slideCurrent --
document.slide.src = slideshow[slideCurrent]
}
else
{
slideCurrent = slideNumber - 1
}
}
function playSlides()
{
if(slideCurrent < slideNumber)
{
slideCurrent ++
document.slide.src = slideshow[slideCurrent]
setTimeout("playSlides()", 2500)
}
else
{
slideCurrent = 0
document.slide.src = slideshow[slideCurrent]
setTimeout("playSlides()", 2500)
}
}
function openPicture()
{
window.open(slideshow[slideCurrent], "slideWindow")
}
//-->
</script>
</head>
<body onLoad = loadSlides()>
<a href='java script: openPicture()'><img name='slide' width=96 height=96></a><br>
<center>
<a href='java script: slidePrevious()'><img src='prev.bmp'></a>
<a href='java script: slideNext()'><img src='prev.bmp'></a>
<a href='java script: playSlides()'><img src='prev.bmp'></a>
</center>
</body>
</html>
If you need more information, just ask and I'll reply. Good luck with the script and enjoy! If I receive my hosting, I will upload the script to the server and show you what it's supposed to do.
NOTE: You can add more pictures to the array by copying the format that is being used in it:
CODE
<html>
<head>
<script language='Javascript' type='text/css'>
<!--
slideshow = new Array(
"images/image1.bmp", "images/image2.bmp",
"images/image3.bmp", "images/image4.bmp"
)
slideNumber = slideshow.length
slideCurrent = 0
function loadSlides()
{
document.slide.src = slideshow[slideCurrent]
}
function slideNext()
{
if(slideCurrent < slideNumber)
{
slideCurrent ++
document.slide.src = slideshow[slideCurrent]
}
else
{
slideCurrent = 0
document.slide.src = slideshow[slideCurrent]
}
}
function slidePrevious()
{
if(slideCurrent > 0)
{
slideCurrent --
document.slide.src = slideshow[slideCurrent]
}
else
{
slideCurrent = slideNumber - 1
}
}
function playSlides()
{
if(slideCurrent < slideNumber)
{
slideCurrent ++
document.slide.src = slideshow[slideCurrent]
setTimeout("playSlides()", 2500)
}
else
{
slideCurrent = 0
document.slide.src = slideshow[slideCurrent]
setTimeout("playSlides()", 2500)
}
}
function openPicture()
{
window.open(slideshow[slideCurrent], "slideWindow")
}
//-->
</script>
</head>
<body onLoad = loadSlides()>
<a href='java script: openPicture()'><img name='slide' width=96 height=96></a><br>
<center>
<a href='java script: slidePrevious()'><img src='prev.bmp'></a>
<a href='java script: slideNext()'><img src='prev.bmp'></a>
<a href='java script: playSlides()'><img src='prev.bmp'></a>
</center>
</body>
</html>
If you need more information, just ask and I'll reply. Good luck with the script and enjoy! If I receive my hosting, I will upload the script to the server and show you what it's supposed to do.
Fri Jul 8, 2005 Reply New Discussion
Help: How To Make A "shoutbox " ? Who know how make "Shoutbox" ?? (10)
|
(0) Need Opinion - Language Redirection Script...
|
Index




