O'Reilly logo

The Essential Guide to Physics for Flash Games, Animation, and Simulations by Adrian Dobre, Dev Ramtal

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

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 ...

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