Chapter 13. Animating in Code

Using the EnterFrame Event

Although today's Flash platform does many things, at its heart Flash is always, and hopefully always will be, an animation tool. Traditionally, animation was created by applying tweens to objects on the Stage and controlling them through the Timeline. Although this approach still works, and has in fact been vastly improved in Flash CS4 Professional, you also have the ability to animate objects entirely through code.

A common misconception about animating in ActionScript is that it relies on loops. To an extent, there is some logic there: It makes sense that if you wanted to move an object across the Stage, you might create a while loop that increments the x property of the object repeatedly ...

Get ActionScript®: Your visual blueprint™ for creating interactive projects in Flash® CS4 Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.