I have some elastic scale code that I'm using, and it works for the most part. The actions in the first frame are the common:
And there's a movieclip with this code on it:Code:Movieclip.prototype.elasticScale = function(target, accel, convert) { xScale = xScale * accel + (target - this._xscale) * convert yScale = yScale * accel + (target - this._yscale) * convert this._xscale += xScale this._yscale += yScale } stop();
And it scales/bounces perfectly. Problem is, once I add another movieclip with the same clipEvent actions, this second movieclip enlarges as is should *but also* makes the first movieclip jiggle. Any way to prevent this from happening?Code:onClipEvent (enterFrame) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { elasticScale(120, 0.7, 0.3); } else { elasticScale(100, 0.7, 0.3); } }




Reply With Quote