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:
- New ways of handling data that result in a much faster playback performance in Flash Player 9.
- A new model for detecting and responding to events (like a mouse click or a keyboard input).
- A display list, which manages the dynamic display of all kinds of graphics on the Stage.
- Low-level object control, so ActionScript can now control virtually every kind of Flash element.
- Less dependence on the movie clip symbol as the main actor in advanced Flash projects. ActionScript 3.0 now provides different different objects that are more specific to that task rather than rely on the movie clip for a wide variety of purposes.
- Changes in the actual language, so users familiar with the previous versions of ActionScript will have to relearn commands (like getURL is now navigateToURL, properties like _x changed to simply x).
Though dramatic, the changes in ActonScript 3.0 provide a clear advantage in performance and overall sophistication that advanced object-oriented programmers and developers of rich Internet applications will appreciate. But newcomers to ActionScript should begin study with the basic building blocks - objects and classes. This may be more of a challenge to designers who have no programming background at all since it requires a little more thinking on how to do even the simplest of tasks such as applying actions to buttons or movie clips with the new event model.
Documentation and References
Adobe has an excellent online document comparing the differences between ActionScript 2.0 and 3.0 as well as an AS 3.0 manual (.pdf) covering most of AS 3.0 for Flex or Flash. that will be of help. There is also a nice ActionScript 3.0 Migration CheatSheet (.pdf) that you can use, created by Sean Moore that should come in handy too.
For a quick overview of AS 3.0, checkout this video (.zip).
For more specific information, here are a few chapters (.pdf) from Collin Moock's new book Essential ActionScript 3.0.
- ActionScript 3.0 Language Basics
- Custom Classes
- Display List
- Working with Text
- Programmatic Animation
Examples
