O'Reilly logo

Learning ActionScript 3.0, 2nd Edition by Rich Shupe, Zevan Rosser

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Motion

IN THIS CHAPTER

Basic Movement

Simple Physics

A Basic Particle System

Simple Collision Detection

Geometry and Trigonometry

Programmatic Tweening

What’s Next?

From your very first experiment to the umpteenth time you’ve performed a familiar task, moving assets with code can be very gratifying. In addition to creating more dynamic work by freeing yourself from the permanency of the timeline, there is something very immediate and pleasing about controlling the motion of an object purely with ActionScript.

Because programming motion can cover many concepts, we’ve chosen to focus on a few key topics in this chapter. For each group of ideas we introduce, we offer what we call simplified simulations—that is, we don’t maintain that our examples accurately reflect real-world scenarios. When discussing physics, for example, we won’t be accounting for every force that can act on an object. On the contrary, we’ll try to provide simple implementations that you can easily integrate into your own projects.

We also hope to show that math can be your friend. To some of you, this may be a given, but to others, math can be a little intimidating. If you’re in the latter group, we hope to reduce what may be a knee-jerk reaction to nothing more than working with numbers. Understanding just a few practical applications of mathematical or scientific principles can really go a long way. Before you know it, you’ll be creating what seem like complex animations with little effort. You’ll be building ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required