# Snowflake

**URL:** https://forum.kirupa.com/t/snowflake/210190
**Category:** flash
**Created:** [December 15, 2006, 10:49pm UTC](https://forum.kirupa.com/t/snowflake/210190 "2006-12-15T22:49:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ferg](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@ferg](https://forum.kirupa.com/u/ferg)
#### Post date: [December 15, 2006, 10:49pm UTC](https://forum.kirupa.com/t/snowflake/210190/1 "2006-12-15T22:49:30Z")

</div>

Hello - I learned alot from the snow flake tutorial ( [http://www.kirupa.com/developer/mx/snow2.htm](http://www.kirupa.com/developer/mx/snow2.htm) )

```auto

onClipEvent (load) {
 //specifies the size of the movie stage
 movieWidth = 300;
 movieHeight = 200;
 
 //variables that will modify the falling snow
 i = 1+Math.random()*2;
 k = -Math.PI+Math.random()*Math.PI;
 
 //giving each snowflake unique characteristics
 this._xscale = this._yscale=50+Math.random()*100;
 this._alpha = 75+Math.random()*100;
 this._x = -10+Math.random()*movieWidth;
 this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
 //putting it all together
 rad += (k/180)*Math.PI;
 this._x -= Math.cos(rad);
 this._y += i;
 if (this._y>=movieHeight) {
  this._y = -5;
 }
 if ((this._x>=movieWidth) || (this._x<=0)) {
  this._x = -10+Math.random()*movieWidth;
  this._y = -5;
 }
}

```

My one questions is…I copied and pasted the exact code into another .fla file, and for some reason…the snow flakes fall straight down, instead of oscilating a little side to side

Author - Help!

Thank you :snug:

oops wrong Link…

btw what does that little red flag mean in the frame? I think that might be my problem, since it is the only difference. The movie clip from Kirupa has it, and mine does not :panda:
