There are two basic ways of animating objects programmatically in AS3: using the TIMER class or using the ENTER_FRAME event. In this tutorial we demonstrate the latter method. We animate a tossed, bouncing ball.

Click on the screen shot below to open one of the applets of this tutorial in the new window:


Download all source files, including a pdf guide, corresponding to this tutorial in the following compressed folder.

The pdf guide in the zip file explains step-by-step how to animate a bouncing ball programmatically with the ENTER_FRAME event. The two fla files show to ways of creating the ball itself: programmatically and at authoring time.

Back to Intermediate Tutorials              Back to Flash and Math Home

We welcome your comments, suggestions, and contributions. Click the Contact Us link below and email one of us.

Adobe®, Flash®, ActionScript®, Flex® are registered trademarks of Adobe Systems Incorporated.