|
||||||||||||||||||||||||||||||
. |
|
Home Image Effects Here Blending Image Slideshow Script (Best seen with IE 4.x) Credits: Dynamic Drive Description: A cool JavaScript image slideshow that rotates among many images. Each time the image changes, so does the link associated with it. IE 4.x users will also see a special "blend-in" effect take place each time the image switches. Step 1: Insert this into the <head> section of your page. Change "firstimage.gif", "secondimage.gif", and "thirdimage.gif" to your own: If you want more than three images, add the below code to the above: var image4=new Image() where "4" represents the fourth image. If you have a fifth image, add even more of those two lines, with "4" changed to "5". Step 2: Insert the below into the <body> section of your page: Step 3: Finally, insert the below into the <body> tag itself, like this: <body onLoad="slideit()"> We're not quite out of the woods yet... Now, change "firstimage.gif" inside the <a> tag to your own (the first image). Change "var number_of_images=3" and "var speed=3" in the first two lines of the <script> tag to reflect your own configuration, where "number_of_images" contains the number of images in the slideshow, and "speed" represents the pace at which the image slideshow changes (in seconds). In the last few lines of the <script> tags, you see: " Change "link1.htm, "link2.htm", and "link3.htm" to your own URLs; These URLs are the ones that will be associated with the first, second, and third image, respectively. If you have more than three images in the sideshow, add more of the below to the above code: else if (whichimage==4) where "4" represents the fourth image. If you have a fifth image, add even more of those two lines, with "4" changed to "5". Take a deep breathe...you're done!
Recommend Us! Legend Copyright © 1998-2004 Dynamic Drive. Please read Terms Of Use here before using any of the scripts. Partners: JavaScript Tutorials | JavaScript Reference |