View Single Post
Old 08 September 2002, 04:57   #21
Posts: n/a

I coded a quick and dirty Javascript codewheel (I would've had it done sooner, but IE gave me sooooo much shit. Eventually I figured out it doesn't like <BODY onload="functionname()">...piece of shit. Opera thought it was cool though)

Anyway, it's nothing spectacular and I'm sure just about anyone else can do better, but that's my attempt. It uses different images for everything since I have no idea how to rotate a graphic in Javascript (although I would assume it's possible)


To use it, do the following:

- Save all the graphics with the same filename, but with a counter appended to my case, I used wheel0.gif, wheel1.gif......wheel10.gif

- Where I've written:
var firstnumber = 0, lastnumber = 10, counter = 0;

change firstnumber to the first value in the filenames and lastnumber to the last value in the filenames (my filenames start at 0 and end at 10). Also, change the counter to the first value

- Where I've written:
var basedir = "gfx/";

change the basedir to whereever you're storing your graphics.

- Replace all references of "wheel" to whatever you called your filenames and replace all references of ".gif" to whichever fileformat you're using


That's about it. um. It's pretty self explanatory. Just muck around with the code and you'll get what you want
Someone should take the scans Sane has produced, and make the relevant graphics. From there, you have the code and the graphics, thus producing the Javascript Codewheel

The end
AdSense AdSense  
Page generated in 0.03803 seconds with 10 queries