# Flip the snow over

**URL:** <https://forum.kirupa.com/t/flip-the-snow-over/155870>\
**Category:** flash\
**Created:** [July 20, 2005, 11:21pm UTC](https://forum.kirupa.com/t/flip-the-snow-over/155870 "2005-07-20T23:21:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikiekwoods](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mikiekwoods](https://forum.kirupa.com/u/mikiekwoods)\
**Post date:** [July 20, 2005, 11:21pm UTC](https://forum.kirupa.com/t/flip-the-snow-over/155870/1 "2005-07-20T23:21:49Z")

</div>

I’ve been trying to flip the snow tutorial code over so that they become bubbles. For some reason when I adjust the conditional statement that resets the snow/bubbles when it reaches a point, everything stops working.

Can someone help?

```auto
onClipEvent (load) {
 //specifies the size of the movie stage
 movieWidth = 580;
 movieHeight = 50;
 
 //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=10+Math.random()*100;
 this._alpha = 25+Math.random()*100;
 this._x = -10+Math.random()*movieWidth;
 this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
 //putting it all together
 rad += (k/5000)*Math.PI;
 this._x += Math.cos(k);
 this._y -= i;
 if (this._y<=0){
  this._y = 200;
 }
 if ((this._x>=movieWidth) || (this._x<=0)) {
  this._x = Math.random()*movieWidth;
  this._y = 100;
 }
 }
 
  

```
