# Falling Snow

**URL:** <https://forum.kirupa.com/t/falling-snow/244673>\
**Category:** Uncategorized\
**Created:** [November 20, 2007, 7:39pm UTC](https://forum.kirupa.com/t/falling-snow/244673 "2007-11-20T19:39:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![checoalfalfa](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@checoalfalfa](https://forum.kirupa.com/u/checoalfalfa)\
**Post date:** [November 20, 2007, 7:39pm UTC](https://forum.kirupa.com/t/falling-snow/244673/1 "2007-11-20T19:39:47Z")

</div>

Hi!!! I need create bubbles in flash, I used the fallinng snow script but I need that the particles go to the sky and not go to the floor :’( please heeeeelp. This is the code…

onClipEvent (load) {  
//specifies the size of the movie stage  
movieWidth = 78;  
movieHeight = 516;

```
    //variables that will modify the falling snow
i = 1+Math.random()*1;
k = -Math.PI+Math.random()*Math.PI;

//giving each snowflake unique characteristics
this._xscale = this._yscale=30+Math.random()*60;
this._alpha = 50+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 = 20+Math.random()\*movieWidth;  
this.\_y = 5;  
}  
}

Thnks !!! :snug:
