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 ...
Get Learning ActionScript 3.0, 2nd Edition 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.