The Essential Guide to Physics for Flash Games, Animation, and Simulations
by Dev Ramtal, Adrian Dobre
ActionScript 3.0 classes
If you've programmed using an earlier version of ActionScript before version 3.0, chances are you haven't worried too much about classes. However, in AS3.0 it is impossible to ignore classes, because they are built into the very structure of the language. So what is a class?
A class is a fundamental construct of object-oriented programming (OOP). It is an abstract specification of an object that you want to create. An object is anything that exists in your movie at runtime.
Now that sounds pretty abstract, so let's look at an example. Suppose you want to create particles in a project, and the particles will be the objects. How will Flash know how to make particles? Well, you'll first have to tell it what a particle consists ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access