# Rising Bubbles Flash MX 2004

**URL:** <https://forum.kirupa.com/t/rising-bubbles-flash-mx-2004/160954>\
**Category:** flash\
**Created:** [August 30, 2005, 10:22pm UTC](https://forum.kirupa.com/t/rising-bubbles-flash-mx-2004/160954 "2005-08-30T22:22:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwkistler](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@kwkistler](https://forum.kirupa.com/u/kwkistler)\
**Post date:** [August 30, 2005, 10:22pm UTC](https://forum.kirupa.com/t/rising-bubbles-flash-mx-2004/160954/1 "2005-08-30T22:22:59Z")

</div>

I have made a movieClip of Rising Bubbles based off the falling snow 2.0 tutorial that works great with Flash Player 6 ActionScript 2.0 but I can’t get it to work for Flash Player 7 ActionScript 2.0.

Here is the ActionScript for the Actions layer:

var bubbles = 8;  
do {  
duplicateMovieClip(bubble, “bubble”+k, k);  
k++;  
} while (k != bubbles);

Here is the ActionScript attached to the bubble instance:

onClipEvent (load) {  
//variables  
var width = 35;  
var height = 0;  
//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/10)Math.PI;  
//xmovement = \_root.\_xmouse;  
xmovement = \_xmouse;  
this.\_x -= Math.cos(rad)+(xmovement-(width/2))/100;  
// 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 = 17;  
this.\_x = -width+Math.random()(3_width);  
}  
}

Thanks,

KK
