|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Sponsor Box
I put this code right into the body of my website where I wanted it to go
The order is 1/2/3/1 that way it repeats itself correctly, at 2seconds each frame (2000 milliseconds) function imgOne() //First Image function { document.myimg.src = 'images1.jpg'; //First Image setTimeout("imgTwo()", seconds * 2000); // After 2 seconds will change to Image Too } I took out the Fade in/out but it is not hard to add back in, just google "Image Fade in/out" and insert the times and function under each image. Code:
<script language="javascript" type="text/javascript">
img2 = new Image()
seconds = "2";
function imgOne()
{
document.myimg.src = 'images1.jpg';
setTimeout("imgTwo()", seconds * 2000);
}
function imgTwo()
{
document.myimg.src = 'images2.jpg';
setTimeout("imgThree()", seconds * 2000);
}
function imgThree()
{
document.myimg.src = 'images3.jpg';
setTimeout("imgOne()", seconds * 2000); //reverts back to first image
}
</script>
<body onLoad="imgOne();"/>
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|