Hi
I have this slideshow, and every image appear 2 seconds.
I want to set the duration of every image to my need.
For example:
– show sample01.jpg for 5 seconds then
– show sample02.jpg for 4 seconds then
– show sample03.jpg for 9 seconds then
– show sample04.jpg for 15 seconds then
– show sample05.jpg for 11 seconds then start again with sample01.jpg for 5 seconds and so on …
[CODE]<html>
<head>
<title>Welcome!</title>
<script type=”text/javascript”>
var image1 = new Image()
image1.src = “sample01.jpg”
var image2 = new Image()
image2.src = “sample02.jpg”
var image3 = new Image()
image3.src = “sample03.jpg”
var image4 = new Image()
image4.src = “sample04.jpg”
var image5 = new Image()
image5.src = “sample05.jpg”
</script>
</head>
<body>
<center>
<img src=”sample01.jpg” name=”slider1″ width=800 height=380 />
<script type=”text/javascript”>
var x=1;
function slider()
{
document.images.slider1.src = eval(“image”+x+”.src”);
if (x<5)
x++;
else
x=1;
setTimeout(“slider()”,2000);
}
slider();
</script>
</center>
</body>
</html>