Elastic button A.script

Hey all!:trout:

I am trying to insert the elastic actionscript code of this button into [URL=http://www.in2illusions.com/elasticity_into_this.fla]this text button , but i can´t seem to get it to work.
I want the text button to move the way the ellipse button moves when you roll over the mouse.
Could somebody please help me with this?:*(

regards: Daisy


  1. the code won’t work in a Button, convert in to MovieClip or put the Button into a MovieClip.

  2. define the variables friction, ratio and maxDistance.

  3. check the attached FLA. :stuck_out_tongue:

Thank you Kax!:love:
You think there would be a way to make the text sharp even when it moves?Because when you roll over the text and the text starts to move it turn all blurry:(

Thank you again;)

you can round the value, but the movement might look a bit choppy. :-\

replace the last two lines of code in the onClipEvent (enterFrame) handler with this code:

_x = Math.round(_x+newX);
_y = Math.round(_y+newY);

that should do…