AUTHOR:Anarchos TYPE: Freeware BROWSERS: Javascript enabled all
This object oriented banner ad rotator script allows you to rotate multiple banner ads on your page and change them after a certain time. The script can
also display a status bar
message on MouseOver.
The
rotating banners have to be of the same size. Our example rotates 3 different banners and the images are
set to refresh every five seconds.
EXAMPLE
1)Download
this ZIP file with the bannerad3.js script file and unzip
into the appropriate directory.
2) Insert this script in the <HEAD> section of the page.
3) Insert this script in the
<BODY> section where you want the rotating banners to appear in the page.
4) Define the timer, the size of the banners, the images and their
location, the URL links
associated to each banner and the messages to be displayed in this section of the script:
// time between rotations (seconds), width and height of banners, alt text, starting banner, and random (0 means it iterates through banners, 1 means it randomly picks the next
banner)
myAd = new Banner( 5, 468, 60,
"Visit our sponsor", 1, 0 );
You can add as many banners as you like. If you want to have multiple banner ad rotators on the same page, don't use
myAd as the variable name for each one. You'll need a different name for
each rotator.
5) Define where the bannerad3.js file is located in script call
you've placed in the <HEAD>
section: