# How to use this action script?

Hi.

I´ve got on robert penners web site some exemples of action script for ease and elastic movement. here is one of the codes I´m trying to apply on a movie to start.

``````class com.robertpenner.easing.Elastic {
static function easeIn (t:Number, b:Number, c:Number, d:Number, a:Number, p:Number):Number {
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
if (!a || a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
}
static function easeOut (t:Number, b:Number, c:Number, d:Number, a:Number, p:Number):Number {
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
if (!a || a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return (a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b);
}
static function easeInOut (t:Number, b:Number, c:Number, d:Number, a:Number, p:Number):Number {
if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
if (!a || a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
}
}
{
``````

Could someone point me some way of usage of theses codes? where to put them? or point me some tutorials or threads?

Thanks