# Kirupa's snow in ActionScript 2.0

**URL:** <https://forum.kirupa.com/t/kirupas-snow-in-actionscript-2-0/131678>\
**Category:** Uncategorized\
**Created:** [December 18, 2004, 7:10am UTC](https://forum.kirupa.com/t/kirupas-snow-in-actionscript-2-0/131678 "2004-12-18T07:10:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smoothhabitat](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@smoothhabitat](https://forum.kirupa.com/u/smoothhabitat)\
**Post date:** [December 18, 2004, 7:10am UTC](https://forum.kirupa.com/t/kirupas-snow-in-actionscript-2-0/131678/1 "2004-12-18T07:10:09Z")

</div>

This might be a helpful source file for those of you trying to learn AS2. Remember to keep the .as files in the same folder as the .fla, and the files are case-sensitive (so make sure those capital S’s are on the .as files!)

It’s adapted from Kirupa’s tutorial found [here](http://www.kirupa.com/developer/mx2004/snow2.htm).

Here are the class files: [Snowflake.as and [URL=http://www.smoothhabitat.com/blog/as/snow/Snow.as]Snow.as](http://www.smoothhabitat.com/blog/as/snow/Snowflake.as).

So, download those files and open up a new FLA. Make yourself a little snowflake MovieClip, set the identifier to “\*snowflake” (the \* is my little method of keeping track of which library objects are pulled in dynamically) and the AS2.0 class to “Snowflake”.

Next, on frame 1 (or where ever you want it to start snowing) put in the following line:

```php
var s:Snow=new Snow(100,_root,200,100,1);

```

The parameters are as follows: number of flakes, the MovieClip you want these flakes to sit in, the width, height, and wind.

For that mouse over effect:

```php
this.onEnterFrame=function() { s.setWind((_xmouse/20)-4); }

```

Good times.
