ActionScript 3.0 and the Flex SDK

In my free time (right!) over the past few months, I’ve been working on some basic ActionScript 3.0 projects to familiarize myself with the new version. I’ve been using FlashDevelop linked into the Flex SDK to write and compile my code. While I have no gripes with Flex Builder 2, I find it amazing that anyone can just download the Flex SDK for free and start producing Flash with pure ActionScript. I’ve lately been very focused on keeping my code clean and self-contained. With AS2, I’ve always needed to tie everything to an FLA in the Flash IDE, even if working primarily with external classes in FlashDevelop or SEPY. Having a pure AS3 environment is huge. One of my favorite new features is the ability to set document properties through your package definition.

1
2
3
4
5
package {
import flash.display.Sprite;
[SWF(width="400", height="350", backgroundColor="#000000", frameRate="31")]
public class SomeClass extends Sprite {}
}

I haven’t used AS3 for any real world projects yet, but with so many benefits over AS2 already realized from simple exercises, I know the day is fast approaching. I may begin a series of posts on the benefits of using AS3 over AS2 as I encounter these things in my work.