Master Simple Math Concepts to Electrify Your ActionScript
I know we said there would be no math, but this is way easier than it sounds. This practical article uses basic trigonometry in ActionScript to improve the flexibility and creativity of your animations. After this down-to-earth tutorial, you may never shy away from math again.
by Rich Shupe
June 23, 2005
any Flash creatorseven experienced ActionScript codersare unnecessarily frightened by math. Some find the subject so intimidating they will avoid even simple scripting projects if there is any "serious" math involved. However, I think those same Flashers would be surprised by how much they could accomplish, and how easily, by understanding just a small handful of math and (dare I say it?) physics principles.
Understanding a few basic formulas can really bring your ActionScript to a higher level. For example, you can easily add an approximation of gravity, acceleration or friction to games for a much greater level of realism and polish. You can calculate the distance between two points to improve collision detection, and path finding making more complex interactions within reach. Best of all, you can replace the restrictive nature of timeline animations with highly dynamic ActionScript that let you change any parameter you desire at runtimeand let you reuse and adapt the code for many other projects.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!