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:

21 Responses to “Actionscript 2 Version of Snow Storm”

  1. Anonymous Says:

    It looks really nice, but it starts to slow down when you mouse over the flash element in firefox

  2. Anonymous Says:

    Nice. I can use this for a great little easter egg in my current project. Thanks!

  3. Anonymous Says:

    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

  4. Sarge Says:

    Interesting… I watched my system cpu load and saw the same thing… I will have to look into this more.

  5. Cerebral Says:

    The AS3 version can be optimized by replacing the Movieclip reference by a sprite. I did in fact but didn’t benchmarked the difference.

  6. Sarge Says:

    I tried the Sprite route previously and also did not see a change… Strange…

  7. Anonymous Says:

    Very nice, so glad I can at least see it now. I’m gonna have fun messing with the properties on this one.

  8. Casey Edwards Says:

    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?

  9. Sarge Says:

    Is the SnowFlake.as file co-located with the FLA file?

  10. Casey Edwards Says:

    Yeah I think it’s in frame one on layer2. I’m a little green on ActionScript just started learning.

  11. Sarge Says:

    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

  12. Anonymous Says:

    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).

  13. Sarge Says:

    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.

  14. Casey Edwards Says:

    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!

  15. Sarge Says:

    Casey, Thanks! Good verse on your card too btw ;) .

  16. Anonymous Says:

    Great stuff. Here is my usage/variation for some company cheer!

    fundamentalflaws.com/flash/HappyHolidays/index.html

  17. Anonymous Says:

    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

  18. Sanford Rosser Says:

    So cool. I gotta try that one out.

  19. Gino Says:

    I have a question. Is there any way to toggle this effect on and off?

  20. Anonymous Says:

    A great script – worked out perfectly with some minor tweaks in a project we just put together.

    http://www.infiniteartworks.com/dev/bosch/

  21. Anonymous Says:

    how do you stop it once it kicks on?

Leave a Reply