Превед всем профессионалам. Я уже поднимал тему по поводу этого, и примерно понял что нужно сделать чтобы пульки(pula) когда касаются друг друга взрывались. НО! у меня другая проблема появилась: если кликаешь два или более раза подряд, то первый шарик остается на месте столкновения с ball, а последующие все как надо делают. Если кликать и двигать мышкой, то есть с поворотом башни пушки, то все норм.
Не скажите что мне делать господа.

Код:
stop();
speed = 5;
depth = 0;
depth1 = 3;
depth2 = 1;
depthLower = -1;
nose = 40;
DISTANCE = 3;
_root.onMouseMove = function() {
updateAfterEvent();
xdiff = _root._xmouse-ball._x;
ydiff = _root._ymouse-ball._y;
angle = Math.atan2(ydiff, xdiff);
angle = angle*180/Math.PI;
ball._rotation = angle;
};
ball.onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
ball._x += DISTANCE;
} else if (Key.isDown(Key.DOWN)) {
ball._y += DISTANCE;
} else if (Key.isDown(Key.LEFT)) {
ball._x -= DISTANCE;
} else if (Key.isDown(Key.UP)) {
ball._y -= DISTANCE;
}
if (ball._x>385) {
ball._x = 15;
}
if (ball._x<15) {
ball._x = 385;
}
if (ball._y>485) {
ball._y = 110;
}
if (ball._y<110) {
ball._y = 485;
}
};
_root.onMouseDown = function() {
angle = ball._rotation;
angle = angle*Math.PI/180;
ball.gotoAndPlay(2);
++depth;
txtShoots.text = depth;
var newNameClip = "pulka"+depth;
var num:Number = random(4)+1;
var newname = "pula"+num;
this.createEmptyMovieClip("newNameClip"+depth,depth);
newPula = "pulka";
this["newNameClip"+depth].attachMovie(newname,"pulka"+depth,depth);
this["newNameClip"+depth]._x = ball._x+nose*Math.cos(angle);
this["newNameClip"+depth]._y = ball._y+nose*Math.sin(angle);
this["newNameClip"+depth].xmov = speed*Math.cos(angle);
this["newNameClip"+depth].ymov = speed*Math.sin(angle);
this["newNameClip"+depth].onEnterFrame = function() {
this._x += this.xmov;
this._y += this.ymov;
if (this._x>390) {
this.xmov *= -1;
this._alpha -= 15;
}
if (this._x<10) {
this.xmov *= -1;
this._alpha -= 15;
}
if (this._y>490) {
this.ymov *= -1;
this._alpha -= 15;
}
if (this._y<105) {
this.ymov *= -1;
this._alpha -= 15;
}
if (this._alpha<20) {
removeMovieClip(this);
}
if (ball.hitTest(this._x, this._y, true)) {
++depth1;
var crash = "bang"+(depth);
this.attachMovie("bang",crash,depth);
trace(this["pulka"+depth]._alpha);
delete this.onEnterFrame;
txtCrashes.text = depth1;
removeMovieClip(this["pulka"+depth]);
}
};
};