sequential image rotation script, rolling slideshow
 

SimplytheBest
Scripts

ASP scripts
PERL scripts
PHP scripts
JavaScripts & Ajax
Snippets
Online scripts

Ajax, DHTML
& JavaScripts

Animation
Background
Bookmarks
Buttons
Calculators
Cookies
Data handling
E-mail
Enhancements
Forms
Image rotation
Menus
Messages
Miscellaneous
Music
Password protection
Redirection
Scrollers
Tables
Time & date
Windows

Publishers
Add script
Account login
Publisher list



 

Home > Scripts > DHTML scripts & JavaScripts > Image rotation > Sequential image rotation script

 

Sequential image rotation script

AUTHOR: RLW
TYPE: Freeware
BROWSERS:
Javascript enabled all

A sequential image rotation script. The images in this example are set to refresh every five seconds.


EXAMPLE

SimplytheBest.net


1)
Insert this script in the <HEAD> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

2) Insert the following HTML code in the <BODY> section where you want the rolling slideshow to appear in the page.

then copy (CTRL-C) & paste (CTRL-V)

3) Define the images and set the timer for the slideshow in this section of the script:

gSlideshowInterval = 5; // how often the image is refreshed (time given in seconds)
gNumberOfImages = 5;
// the total number of images used

gImages = new Array(gNumberOfImages);
gImages[0] = "images/slideshow_1.gif";
gImages[1] = "images/slideshow_2.gif";
gImages[2] = "images/slideshow_3.gif";
gImages[3] = "images/slideshow_4.gif";
gImages[4] = "images/slideshow_5.gif";

4) Define the first image to appear in the slideshow and the URL link (optional) in this section of the HTML code. You must include the NAME="slide" statement to invoke the script:

<P ALIGN=left><a href="http://simplythebest.net"><IMG SRC="images/slideshow_1.gif" BORDER=0 ALT="SimplytheBest.net" NAME="slide"></a></P>


If you need to rotate quite a lot of images and don't want to type a long list of filenames, there is an enhanced version of this script available for only $14.95. The enhanced code will run through the images automatically. Just place the numbered images in the desired directory and that's it.
Click here to order the enhanced code via PayPal.


[BACK] [TOP]

 


Copyright © 1997-2009 SimplytheBest Inc. Terms of Use and Legal Disclaimer.
All copyrights are acknowledged. All rights reserved.