Getting this Penner motion/easing function to work


I am attempting to get a MC to move/ease from down to up with the help of AS without resorting to tweens…

Mind you, I am still working with Flash5.

Right, I found this Robbert Penner function:

Math.easeInElastic = function (t, b, c, d, a, p) {
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs ) { a=c; var s=p/4; }
else var s = p/(2Math.PI) * Math.asin (c/a);
return -(a
Math.pow(2,10*(t-=1)) * Math.sin( (td-s)(2*Math.PI)/p )) + b;


I placed it on a MC (a different one from the ones mentioned below) on frame 1 on _root

With it I want to make a MC (lets call this MC Bob) move from down to up (out of sight) after the timeline in another MC (hostMC) has reached a certain Frame (lets say frame 23).

Since I have to tell Flash to execute this function (which I am forced by Flash5 to put functions within a ActionScript:

I put ActionScript:


attached to another MC which I placed inside hostMC on frame 23.

Needless to say, it doesnt work.

But what am I doing wrong?