If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

20=20ms, so just change that to a higher or lower number for more delay (slower) or less delay (faster).
But note that this method will make the animation choppier if slowed too much, or might overload the processing in the browser if sped up too much.

Getting into the slightly more complicated math, this line can also be modified:

Code:

Speed[i]= Math.random()*5+3;

Changing 5 to another value will change the rate of random falling, and changing 3 to another value will change the default base/minimum speed.

(Note: I haven't tested any of this, but if it doesn't work just let us know.)

The only problem is that it's now very subtly jumpy because it's now running about 20 frames per second (1000/50=20). 24 frames per second is standard for films, and 25 (Europe) to 30 (US) is standard for video/tv (which, through a complex process can actually be effectively 50-60fps). The original script is (1000/20=50) 50fps, so that's fast enough, like European TV. Basically those rates are fast enough that the eye sees it as smooth motion. Once you reach something like 15fps, it can start to look pretty choppy. Here, 20 is right on the edge.

So-- either make it go a little faster (maybe a value of 40, making it about 24fps, like a film in a theater), or try changing that other line I showed you instead. Aside from potentially making the motion not work at all, it won't do any permanent damage to the site/script-- just save a backup in case you change something the wrong way. Use some trial and error to find what you like.

Of course if you're happy with it at the moment, that's fine. In fact, some videos (on the internet) are presented at 15fps, and people don't mind too much, so 20fps should be fine. It just might be a little jumpy to some people.

I think that looks pretty reasonable. I'm using Firefox 15 on a Mac. But it should render the same way on all browsers (that support the script), at least if the computer isn't too slow (or overloaded processing other things). This is just a frame-by-frame animation, so it won't look any smoother/better on a better computer, but a sluggish computer might make it look worse (although it would have to be a fairly old computer these days-- that isn't too much work for most modern machines).

If you feel like playing with the script more, something you might try doing is creating less leaves as time increases. (It wouldn't be so difficult to add this, but it would take a lot of trial and error to get the details right.) Essentially add a decay based on time so that as time goes on fewer and fewer leaves start to fall. This just would help in the case of reading long posts, where the leaves might get annoying.

Of course there's always the change that your users will simply find the script to be annoying (having things fall as they're using the forum), but just see what happens. It does add something aesthetic to the design, so it should be fine.

Another option is to disable it except on the forum index, if that's what you'd like. It wouldn't be too hard to do that (just a basic IF statement I'd think-- again some trial and error).

I know nothing about writing codes, I'm a silver surfing grandmother LOL, I just know if I put them in the right place they usually work. Some of the codes I have running do require me to add image links to them, lots of links in some cases.

I'll just be running this code in my main header using it in my global header would give my members a headache when reading or replying to threads. Just wish it didn't run while I'm viewing my headers and footers - thankfully I don't need to access them very often.

Ok, that's fine. Well, code is something you can learn just by trial and error (especially something like this with lots of numbers-- think of each number as a gas pedal in a car, that can go slower or faster-- it'll take a while to figure out exactly what each does, but it'll change something). Just save a backup first