The reason they still remain is that the swapDepths function makes the depths a positive number. So they need to be removed with the 'removeMovieClip' function.
Code:onClipEvent (load) { hx = 390 / 2; hy = 325 / 2; r = 100; a = 30; r2 = 50; p = 0; speedX = 0; function speed(num) { speedX = -(_root._xmouse - hx) / num; return speedX; } function trans() { p += speed(100); range = ((p + 180) * Math.PI) / 180; re1 = ((Math.sin(range)) * r); re2 = ((Math.cos(range)) * a); re3 = ((Math.cos(range)) * r2); } function props() { trans(); _x = hx + re1; _y = hy + re3; _xscale = _yscale = _alpha = re2 + 70; this.swapDepths(_alpha); } this.onPress = function() { trace(this) this._parent.gotoAndStop(5); //replace 'instance1', 'instance2' etc with actual instance names of clips this._parent.instance1.removeMovieClip(); this._parent.instance3.removeMovieClip(); this._parent.instance4.removeMovieClip(); this.removeMovieClip(); }; } onClipEvent (enterFrame) { props(); }




Reply With Quote