I need to create some bubbles going to the surface while getting bigger. I would like it to only have a row at a time containing 5-8 bubbles. When they hit the surface they should pop. As I have not been able to find a tutorial doing exactly that. So I had to compromise, as I found a snowflake tutorial. I used the following actionscript in the movieclip. It however doesn’t work with the Flashplayer 8.
onClipEvent (load) {
//variables
width = 40;
height = 80;
//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()(3width);
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;/
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 = 210;
this._x = -width+Math.random()(3width);
}
}
and this one in the frame of the movieclip…
snowflakes = 4;
do {
duplicateMovieClip(snow, “snow”+k, k);
k++;
} while (k != snowflakes);
Can anyone tell me what the problem is. As I am not super good at Actionscript I would really appreciate if any of you gurus know a good tutorial or have a similar script laying around for share please let me know?
Thanks
-BonWhis