# How to make bubble dripping to the top

**URL:** https://forum.kirupa.com/t/how-to-make-bubble-dripping-to-the-top/210408
**Category:** Uncategorized
**Created:** [December 18, 2006, 4:09pm UTC](https://forum.kirupa.com/t/how-to-make-bubble-dripping-to-the-top/210408 "2006-12-18T16:09:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kitaeshi](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kitaeshi](https://forum.kirupa.com/u/kitaeshi)
#### Post date: [December 18, 2006, 4:09pm UTC](https://forum.kirupa.com/t/how-to-make-bubble-dripping-to-the-top/210408/1 "2006-12-18T16:09:29Z")

</div>

Hi all, i saw the snow tutorial, at [http://www.kirupa.com/developer/mx2004/snow2.htm](http://www.kirupa.com/developer/mx2004/snow2.htm)

i wan to make the snow to flow from bottom to top, i try to modified the \_y but either the snow stuck on top or it won’t duplicate it self.

Hope someone here can guide me.

thanks.

onClipEvent (load) {  
//variables  
width = 300;  
height = 200;  
//random x,y, and alpha  
this.\_xscale = this.\_yscale=50+Math.random()_100;  
this.\_alpha = 20+Math.random()50;  
//random x and y for flakes  
this.\_x = -width+Math.random()(3_width);  
this.\_y = -10+Math.random()\*height;  
//speed and trigonometric value  
i = 1+Math.random()\*2;  
k = -Math.PI+Math.random()_Math.PI;  
rad = 0;  
}  
onClipEvent (enterFrame) {  
// horizontal movement  
rad += (k/180)Math.PI;  
xmovement = \_root.\_xmouse;  
this.\_x -= Math.cos(rad)+(xmovement-(width/2))/50;  
// vertical movement  
this.\_y += i;  
// remove clips when they misbehave (overstep boundaries)  
if (this.\_x\>(width+50)) {  
this.\_x = -45;  
this.\_y = Math.random()height2;  
}  
if (this.\_x\<-50) {  
this.\_x = width+45;  
this.\_y = Math.random()height2;  
}  
if (this.\_y\>=height) {  
this.\_y = -50;  
this.\_x = -width+Math.random()(3_width);  
}  
}
