I got this code which makes and movieclip named box shake when the mouse comes close to it…
I want more than one box to shake yet I can’t make it happen by adding the script to each new movieclip and changing the script and naming the objects differently?
this.onEnterFrame=function(){
// Find distance
var dx=_xmouse-box._x;
var dy=_ymouse-box._y;
var distance=dxdx+dydy;
box.shakeYourBody(100000/(distance+10));
}