Actionscript 2 Version of Snow Storm
**UPDATE**More than one person seemed to have questions about the usage of this class. I have uploaded the FLA and .as in a zip file. You can unzip, open the FLA and test it. Get the zip file here.I recently posted the AS3 verion of my snow storm for the year. I thought it would be interesting to port it backwards to AS2 and see how well it performs. I am using 1000 flakes in the example below as well. You can modify that in the FLA. Here is a demo:
Here is the class:
November 28th, 2006 at 8:17 pm
It looks really nice, but it starts to slow down when you mouse over the flash element in firefox
November 28th, 2006 at 9:37 pm
Nice. I can use this for a great little easter egg in my current project. Thanks!
November 28th, 2006 at 10:13 pm
I found this version to use about 10% less processor power than the AS3 version (both using flash player 9 in internet explorer), I’m not down on the technical details… but shouldn’t the AS3 version run quicker? or at least not run that much slower
November 29th, 2006 at 1:45 am
Interesting… I watched my system cpu load and saw the same thing… I will have to look into this more.
November 29th, 2006 at 7:26 pm
The AS3 version can be optimized by replacing the Movieclip reference by a sprite. I did in fact but didn’t benchmarked the difference.
November 29th, 2006 at 7:27 pm
I tried the Sprite route previously and also did not see a change… Strange…
December 1st, 2006 at 5:02 am
Very nice, so glad I can at least see it now. I’m gonna have fun messing with the properties on this one.
December 5th, 2006 at 2:01 am
Hey I found your post and was excited to see how it worked and when I open the fla it doesn’t work? The error I got was:
**Error** Symbol=snowFlake_mc, layer=Layer 1, frame=1:Line 1: The class or interface ‘SnowFlake’ could not be loaded.
Total ActionScript Errors: 1 Reported Errors: 1
Am I doing something wrong?
December 5th, 2006 at 2:03 am
Is the SnowFlake.as file co-located with the FLA file?
December 5th, 2006 at 2:12 am
Yeah I think it’s in frame one on layer2. I’m a little green on ActionScript just started learning.
December 5th, 2006 at 2:17 am
No – that code:
import flash.filters.BlurFilter;
class SnowFlake extends MovieClip{
private var speedMultiplier:Numbe
…. etc
It needs to be in a .as file named SnowFlake.as. It is an external action script file. A separate file from the FLA.
Feel free to email me directly with questions sgtpritchard at gmail.com
December 5th, 2006 at 9:06 pm
Thanks, that works great… especially changing the var numFlakes:Number. I chose 40 (instead of 1000) and it looks like a gentle snow.
The only question I have left is how the .fla file calls the .as file (I don’t see the connection).
December 6th, 2006 at 1:42 pm
The FLA has a clip in the library (snowFlake) that has a class linked to it (SnowFlake.as). When the movie is compiled it sucks the .as file in and applies it to every snow flake we create in our “for loop” within the FLA.
December 19th, 2006 at 10:30 pm
Hey thanks for the help and the tutorial I used the script and a couple others to make my sites holiday ecard:
http://www.caseyedwards.com/happyholidays/
All your tidbits have helped me in my ActionScript education. Thanks!
December 20th, 2006 at 3:35 am
Casey, Thanks! Good verse on your card too btw
.
December 23rd, 2006 at 1:18 am
Great stuff. Here is my usage/variation for some company cheer!
fundamentalflaws.com/flash/HappyHolidays/index.html
April 17th, 2007 at 9:21 pm
This is a great Blog! But if you want to really
earn money from home work with a system that is
good and is as simple as owning your own
ATM Cash Machine!
ATM CASH
April 26th, 2007 at 4:23 pm
So cool. I gotta try that one out.
November 15th, 2007 at 6:49 pm
I have a question. Is there any way to toggle this effect on and off?
December 12th, 2007 at 6:29 pm
A great script – worked out perfectly with some minor tweaks in a project we just put together.
http://www.infiniteartworks.com/dev/bosch/
February 22nd, 2008 at 3:22 am
how do you stop it once it kicks on?