AS 3 Snow Effect with Random Wind
Snow effect experiment in Actionscript 3, with random wind ( I used two sine waves actually). The SnowEffect class could be changed to different kinds of snow effects, as its wind, size, horizon height, intensity are all ready to be updated. Check labs.neatfilm.com to see the effects.
Source code (BSD License) available to download: Snow.zip
Update: Nov 13, 2007. Update for Flash CS3, last version was created in Jan 2007 with Flash 9 before Flash CS3 release.
Math graph behind the snow effect as followed.



























zedia.net said
am December 13 2007 @ 12:01 pm
I really tried to use your code in order to test it, but I never was able to make it work. I had to resort to using the pixelfumes snow storm class which is really heavy on the cpu.
What’s up with all those “this” keywords in your code, you don’t need them at all. Also I think the internal class SnowFlake shouldn’t be internal and that your movie in the library used for the snowflakes should be linked to it.
Thx
george said
am December 13 2007 @ 5:44 pm
I updated for Flash CS3, you could download it and try again.
I use “this” keywords for auto completion like FlashDevelop, it helpful for fast coding but no other different.
Class attribute you can change if you want, In my example it has no problem.
Ed said
am December 16 2007 @ 6:42 am
You can also automatically generate a neat snow image overlay here:
http://nativecoder.com/blog/?p=15
No flash skills required!
Ed
jesse said
am January 20 2008 @ 9:59 am
I agree with zedia – nice effect but coding could be streamlined.