View Single Post
Unread 04-19-2010, 05:25 PM   #70
rpgdemon
Not a Taco
 
rpgdemon's Avatar
 
Join Date: May 2005
Posts: 3,313
rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years. rpgdemon has apparently made an impact on one or two people over the years.
Default

Alright, well, here's the code.

Code:
//Banner Randomization script by Ngamesnick.  Aka rpgdemon
//Go ahead and use it wherever, and to whatever means you like.

imgBanner = new Array(4);
imgBanner[0] = new Image;
imgBanner[0].src = "http://www.nuklearforums.com/image.php?u=7055&dateline=1245190883";
imgBanner[1] = new Image;
imgBanner[1].src = "http://www.nuklearforums.com/image.php?u=583&dateline=1225983597";
imgBanner[2] = new Image;
imgBanner[2].src = "http://www.ngamesrpgs.com/files/forumsworking1.png";
imgBanner[3] = new Image;
imgBanner[3].src = "http://i40.tinypic.com/33dz31f.png";



i = Math.floor(Math.random()*4);
document.banner.src = imgBanner[i].src;
Copy/paste it into notepad, and save it as a script, then just call it immediately below the image. Make sure to name the image "banner".


Implementation:
Code:
<img src="whateveritdoesn'tmatterhere.gif" name=banner><script type=text/javascript src="banner.js"></script>

Edit: And here it is in action!
http://www.ngamesrpgs.com/files/test2.html
__________________
I did a lot of posting on here as a teenager, and I was pretty awful. Even after I learned, grew up, and came to be on the right side of a lot of important issues, I was still angry, abrasive, and generally increased the amount of hate in the world, in pretty unacceptable ways. On the off chance that someone is taking a trip down memory lane looking through those old threads, I wanted to devote my signature to say directly to you, I'm sorry.

Thank you for letting me be better, NPF.

Last edited by rpgdemon; 04-19-2010 at 05:43 PM.
rpgdemon is offline Add to rpgdemon's Reputation   Reply With Quote