Thank you for visiting Blazing Games

The ActionScript 3 Decision

This episode is the first episode that was created using ActionScript 3. What is really interesting about ActionScript 3 is that it breaks away from the earlier ActionScript versions by having a brand new virtual machine that takes advantage of Just In Time (JIT) compiling making the execution speed of ActionScript 3 faster than previous versions. ActionScript 2, which added object oriented support to ActionScript was actually compiled into ActionScript so no changes to the virtual machine were required for that version.

ActionScript 3 was added to Flash Player 9, though in the early beta stages of development it was known as Flash Player 8.5. Surprisingly, the first Adobe product that took advantage of Flash Player 9 was the Flex 2 platform. Even more interesting about Flex 2 is that a freely available software development kit (SDK) was made available for developing Flex applications. Because Flex code is entirely text based, it is much more appropriate for open source development. There was a lot of consideration about moving from Flash to Flex for this day but then Adobe Creative Suite 3 was announced. Flash CS3 targets Flash Player 9 and has support for ActionScript 3. For this reason I decided to stay with Flash for the development of the rest of the One of those Weeks series though I would switch to ActionScript 3.

While the base ActionScript language has not changed that much in ActionScript 3, the switch from ActionScript 2 to ActionScript 3 is still a big change. The biggest changes are the display model, the event system, and the restructured class library.

Finding out that the system used for displaying things has been restructured was actually a huge surprise when you consider that this is the core of Flash. Remember that Flash was originally designed as a vector animation system for the internet. Still, the changes actually do make a lot of sense. The whole model is built on a container system with each display object being able to contain other display objects ultimately forming the display hierarchy. This is similar enough to the layers approach that Flash uses that working with the display is almost the same, yet the hierarchy approach gives you a lot of flexibility.

The way events are handled has changed dramatically. Flash now uses an event listener model where any class can listen for events. This added flexibility does come at a cost as now event handlers need to be created adding a lot more complexity to simple things such as buttons and per-frame handling.

Perhaps the biggest change is the restructured class library. There is much more of a package/class hierarchy and different classes have been moved around to make a much more logically laid out library. That said, people who are use to the ActionScript 2 classes will have to take the new hierarchy into account.

Previous page
Chapter 29 Page 3

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2008 Blazing Games Inc. All Rights Reserved