How do I make a banner rotator?

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
I was wondering if it's possible to make a banner rotater without using a script or a program. I want to use about 5 or banners from one place and rotate them every time it's viewed. You know, viewer1 sees banner #1, v2 sees #2, v5 sees #5, v6 sees #1 and so on. If it makes things any easier, these banners all link to the same place. Any help would be much appreciated!!! ;)
 

LordJezo

Banned
May 16, 2001
8,140
1
0
image[1]="http://us.yimg.com/images/yahoo.gif"
image[2]="http://www.excite.com/mesp/images/excite/new_logo-180.gif"
image[3]="http://a284.g.akamai.net/7/284/987/000/lygo.com/ly/i/lyguide.gif"
image[4]="http://cnet.com/Images/Headers/cnet-1-title.gif"
image[5]="http://webcrawler.com/img/web/hdr/home_header.gif"

Just add more image[x] here... to what ever number you want


// Create a random number between 1 and five
random_num = (Math.round((Math.random()*4)+1))

Change that to (where x is the number of images):

random_num = (Math.round((Math.random()*(x-1))+1))

That should do the trick, I think. Been a while since I have done JS, but it's a very very simple language
 

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
Thanks. One more thing, how do I link up the individual banners to stores? Actually even 1 overall link will do.
 

LordJezo

Banned
May 16, 2001
8,140
1
0
Okay.. screw that idea...


Go here:
Script generator

you will be set... just type and click. In the mean time I am going to try to figure out how to do it with that script I posted earlier..
 

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
Thanks, I bookmarked the page for future use. I found a script I might use but setting it up isn't working, so I emailed my buddy to help me out. I don't need stats so much as the rotation ability. Also, it doesn't need to be random, but in a fixed manner (got 1 to 5, then start over). Finally, if there's a way I could use Flash banners in there that would also be great.