Kevin
01-26-2003, 12:30 AM
Is this design feasible?
Just took a shot at it but not sure if this is the right approach?
What I need to do is set up a timer for the length of the show and one that controls how ofter the images are displayed.
I think I have most of the parts here but not quite sure.
var MyPics = new Array()
if (document.images) {
MyPics[0] = new Image(288,288) // pre-cache slide images
MyPics[1] = new Image(288,288)
MyPics[2] = new Image(288,288)
MyPics[3] = new Image(288,288)
MyPics[4] = new Image(288,288)
MyPics[5] = new Image(288,288)
MyPics[0].src = "flower01.gif"
MyPics[1].src = "flower02.gif"
MyPics[2].src = "flower03.gif"
MyPics[3].src = "flower04.gif"
MyPics[4].src = "flower05.gif"
MyPics[5].src = "flower06.gif"
}
var indexSlide = 0;
var lastSlide = MyPics.length - 1;
var manual = 1;
function RandSlide()
{
var NxtSlide = Math.floor(Math.Random() * 7 );
document.Pix.src = MyPics[NxtSlide].src;
}
setInterval (setInterval("RandSlide()",2000),30000);
<INPUT onclick=RandSlide() type=button value=" << ">
I'm sure that there is something more to what I have attempted can you advise?
I also need to use a clearTimeout() to stop the timer if the user wishes to end the slide show and browse manually.
insight always appreciated
Thank You
Kevin:confused:
Just took a shot at it but not sure if this is the right approach?
What I need to do is set up a timer for the length of the show and one that controls how ofter the images are displayed.
I think I have most of the parts here but not quite sure.
var MyPics = new Array()
if (document.images) {
MyPics[0] = new Image(288,288) // pre-cache slide images
MyPics[1] = new Image(288,288)
MyPics[2] = new Image(288,288)
MyPics[3] = new Image(288,288)
MyPics[4] = new Image(288,288)
MyPics[5] = new Image(288,288)
MyPics[0].src = "flower01.gif"
MyPics[1].src = "flower02.gif"
MyPics[2].src = "flower03.gif"
MyPics[3].src = "flower04.gif"
MyPics[4].src = "flower05.gif"
MyPics[5].src = "flower06.gif"
}
var indexSlide = 0;
var lastSlide = MyPics.length - 1;
var manual = 1;
function RandSlide()
{
var NxtSlide = Math.floor(Math.Random() * 7 );
document.Pix.src = MyPics[NxtSlide].src;
}
setInterval (setInterval("RandSlide()",2000),30000);
<INPUT onclick=RandSlide() type=button value=" << ">
I'm sure that there is something more to what I have attempted can you advise?
I also need to use a clearTimeout() to stop the timer if the user wishes to end the slide show and browse manually.
insight always appreciated
Thank You
Kevin:confused: