While this isn't entirely an ActionScript solution, we'd like to
cover Flash CS3's new
Animator classes. These
classes, and their supporting players, make it possible to replay
animations that have been created previously in the timeline.
Scripting purists may be more interested in perfecting their
ActionScript skills than relying on the timeline to originate
animations. However, this capability may be attractive to many Flash
CS3 users, even coding curmudgeons, for two reasons.
First, it doesn't ultimately use the timeline but still makes it possible to reproduce complex animfations created there—including animations that might not be that easy to achieve strictly with ActionScript. Second, it offers a new path to improved designer-programmer collaboration. Designers can create timeline animations, and programmers can integrate that work into other projects without relying on the original timeline structure.
The foundation of this process exists in a feature called "Copy Motion as ActionScript 3.0." After creating a timeline tween, you can select the entire tween and then choose the Copy Motion as ActionScript 3.0 menu option from the Edit®Timeline menu. This copies to the clipboard all necessary information to recreate the tween with code. During the copy process, the feature prompts you for the tweened symbol's instance name with a convenient dialog—prepopulated if the instance name already exists.
Once the copy completes, you can paste ...