Hi!
I'm working on a application with some bubbles. Each bubble goes from the bottom to the top. It works just fine with just one bubble, but when I duplicate the bubble it just stops on it's way towards the top. I want to have many of them, with different properties.
Could there be a "level" problem or?
Here's the code:
Thankful for some adviceCode:function createBubble(){ i++; scale = random(120) + 30; xMove = random(10)+1; yMove = random(30)+1; bubble = bubble_mc.duplicateMovieClip("bub" + i, i); bubble._xscale = scale; bubble._yscale = scale; } my_btn.onPress = function(){ //myBubble = setInterval(createBubble, random(3000) + 100); createBubble(); } this.onEnterFrame = function() { bubble._y -= yMove; bubble._x = Math.sin(a) * xMove + 150; a += 0.2; if(bubble._xscale > 0){ bubble._xscale -= scaleFactor; bubble._yscale -= scaleFactor; } if(bubble._y < 0){ removeMovieClip(bubble); createBubble(); } }
/S-fish




Reply With Quote