Ok, I think I understand that now. But I have one more question. Now I am trying to make a pin pop many balloons. my popped balloons have an animation for when they are popped. I found with this script I could pop a balloon, but if i kept moving the mouse, it would restart the animation. I corrected that by adding a
delete this.onMouseMove;
it worked for one MC.
now I have 4 balloons, when I pooped one, it would delete the onMouseMove so I could not pop any more.
I figured I would add the this.onMouseMove = function(); to the top of each if statement to see if it would work. now it will only pop the last balloon in my if statement.
I'm out of ideas......
here is what I have. (probably no very good)
Code:on(press){ Mouse.hide(); startDrag(this, true); this.onMouseMove = function(){ if(_root.pin.hitTest(_root.r_balloon)){ _root.r_balloon.gotoAndPlay("popped"); delete this.onMouseMove } } this.onMouseMove = function(){ if(_root.pin.hitTest(_root.b_balloon)){ _root.b_balloon.gotoAndPlay("popped"); _root.b_balloon._visible = false; delete this.onMouseMove } } this.onMouseMove = function(){ if(_root.pin.hitTest(_root.g_balloon)){ _root.g_balloon.gotoAndPlay("popped"); delete this.onMouseMove } } this.onMouseMove = function(){ if(_root.pin.hitTest(_root.p_balloon)){ _root.p_balloon.gotoAndPlay("popped"); delete this.onMouseMove } } } on(release){ stopDrag(); this.onMouseMove = undefined }




Reply With Quote