This chapter covered a lot of ActionScript theory, and you may be itching to put some of these concepts into action. In the following chapters, there are many examples that show you how to do just that.
Here's a recap of the topics covered in this chapter:
Classes are blueprints for objects.
Instances are specific objects, in use.
ActionScript objects may have properties, methods, and events.
Properties are the characteristics of objects; by changing values, your programs can change those characteristics.
Methods and functions are the actions in ActionScript.
Methods are included in the definition of an object.
Functions (technically called function closures) are independent of objects.
Events are used to make Flash projects interactive.
Events have two parts: 1) event listeners that wait for events like mouse clicks; and 2) event handlers that run ActionScript statements in response to the event.
Variables are containers for values.
Constants are named values that never change.
Variables can be one of several different data types: Number, int, uint, String, Boolean, and Array.
Arrays can hold multiple values and different types of data.
Operators are used to perform math functions, assign values, and compare values.
Conditional statements, like (if, if…else if, and switch) test to see if a condition exists, and then, based on the result, run or ignore portions of ActionScript code.
Loop statements (like while and for) run portions of ActionScript code either a specified number or times, or while a condition exists.