February 28, 2008

ActionScript 3.0: Events

Events are things that happen that Flash can recognize and respond to. A mouse click is an event, as are mouse movements and keypresses on the keyboard. Events can also be things that the user doesn't initiate. The completion of a sound, for example, is an event.

Anytime an event happens, an object of the Event class is created. When the mouse button is clicked, a MouseEvent object (a subclass of the Event class) is created. When a key on the keyboard is pressed, a KeyboardEvent object (another subclass of the Event class) is created. It may seem a little strange that an object represents an event, but remember Flash objects can be very abstract.

With all these events happening, you need a way to detect and respond to them. You detect an event by creating an event listener (or event handler).

(read more...)

February 16, 2008

ActionScript 3.0: Display List

The key to successful manipulating graphics on the Stage is to understand what is known as the display list. The display list is the hierarchy of visible objects on the Stage. The display list lets Flash keep track of what the user sees, the visual relationships between objects, and the stacking order (or overlapping) of the objects.

Conceptually, it's much like the folder structure on your computer desktop, and can be represented as a tree structure. The top-level element is the Stage. Each time you play a Flash movie in a Web browser, the Flash Player opens your SWF and places it on the Stage. So the Stage is the container that holds your main SWF.

(read more...)

November 14, 2007

What’s New in ActionScript 3.0?

Like any language, ActionScript evolves over time. ActionScript 3.0 is simply the latest version of the Flash programming language that lets you control graphics, animation, sound, and interactivity. However, ActionScript 3.0 represents a significant change (some may say revolutionary) from the previous versions because in many ways it is conceptually and architecturally different.

Key differences from ActionScript 2.0 include:

(read more...)