Target-based tweening with FTween
FTween is a simple tweening utility designed to fill a need not met by the Penner family of time-based tweening solutions. The problem case is one where a target is constantly moving and/or changing at unexpected times. The Penner equations rely on the assumption that a tween will last for a known length of time, but it is often the case that I simply want a smooth transition from one state to another. Tweening content for smooth scrolling and animating a tree menu are two common examples where time-based tweening can have stuttering or less than desirable result. When animating a sprite in such as way that it follows a moving target, Penner tweens don't work at all.
There are two basic types of motion included with FTween: ease and spring. Ease is the classic delta * .3 style of tweening. Spring is an elastic-like motion. The simplest example is tweening a clip to the mouse location:
var tw:FTween = FTween.spring( my_mc, ['_x', '_y'], [_xmouse, _ymouse] );
tw.addListener( this );
function onTweenComplete( mc ) {
trace('Tween is complete');
}
Example: SpringyBox.swf
(Right-click on SWF to view source)
Instead of EventDispatcher, I use AsBroadcaster to issue onTweenComplete events because it's just a little faster. Overall, FTween is not the most efficient tweening engine, but it is quite handy. Example usage is in the class docs. If you'd like to play with it, you can find it in my Bumpslide Library. There are examples in the namespace com.bumpslide.example.ftween. If you find this useful or have ideas for improvement, please let me know.
Update: FTween was finally ported to AS3. You can find it in my as3 code library.

November 30th, 2006 at 8:45 am
i like- so when are you gonna port your as2 to as3 ;)
November 19th, 2007 at 4:24 pm
Hey David,
Havent tried this class yet since I'm at work, but I was curious since this class might solve a problem I'm having with other tweening classes.. Say I have an object that I want to move to new locations with say key down. With other classes I notice a slight pause between one tween ending and the next starting and havent found a solution.