Javascript Background Animator
This is not the world's most complicated JavaScript program ...
in fact the hardest part is that I ended up grabbing from the
hIadaho ColorCenter (I needed help converting decimal values into hex).
The rest of the code is original. I'm not a HUGE fan of background color animation, but it
was a fun project to help cut my teeth on, and I know other people used to like them.
Call the function with this command (you do kind of need to copy the function to your page first):
bgChanger("FFFFFF","000000",25);
The parameters are as follows:
Notes:
You're welcome to use the code, just grab the source for this page. You'll notice
that I have a Big Ol' Comment ... I'm not requiring you to keep the entire comment, but do
ask you leave the last 3 lines of the comment (heck, I need SOME way to draw people to my page ;).
If you like the script feel free to send me some mail.
Reminiscent of Netscape 1.1, isn't it?
"FFFFFF"
The first parameter names the BGCOLOR to begin with
"000000"
The first parameter names the BGCOLOR to end with
25
The last parameter tells the script how many "steps"
to use to fade between the first and last
BGCOLOR. (25 is fairly flicker free on my system
50 is smoother)
Just click here to return to my Main Page