Doing tween animations in Flash using code rather than via the timeline sometimes comes in handy. While it may be harder to visualize, it is a great deal more flexible than timeline animation.
In the project I’m working on now, there is a drop-down menu that requires opening and closing animation upon rollover/rollout. Before, I’d do this with timeline animation combined with the old-school “gotoAndPlay()” to jump to different parts that animate opening and closing. However I’ve found that this makes the animation appear jerky if you hover your mouse over and then really quickly move it away. A better way is using tweens:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var slideMenuOut:Tween = new Tween(galleryMenu, "y", Regular.easeOut, header.galleryMenu.galleryBg.y, 0, 9);
The constructor takes a heck of a lot of arguments that I always have trouble remembering: