Elasticity

How would an elasticity script look in Flash 8?
I tried the following link:
http://www.kirupa.com/developer/actionscript/spring.htm
But it doesn’t work when I publish in Flasher player 7 or 8.

Can I use the tween class here? I want the animation to follow mouse movement.