Action Script 3 So, I've officially taken the plunge into AS3. It was an uphill battle with a lot of procrastinating to make the switch from AS2, but I finally bit the bullet over Christmas break and figured it out. So, given that anyone who uses Flash will ultimately be forced to walk this road, I figure I'll share what I've discovered so far...
A lot of developers are saying that AS3 is easier to use than AS2 because of consistency. I can see where they're coming from. For example, look at creating an object versus a MovieClip between the two:
AS2:
var object:Object = new Object();
var mc:MovieClip = this.createEmptyMovieClip("newClip", 0);
AS3:
var object:Object = new Object();
var mc:MovieClip = new MovieClip();
In AS3, all object oriented processes have been standardized. Good stuff. This goes for pretty much everything within the language, which tightens up programming requirements and makes for better code. However, it also substantially increases developer accountability. AS3 is PICKY. Picky to the point that I've periodically abandoned learning it over the past six months because I couldn't get anything to compile. Program/syntax errors that AS2 would forgive and ignore now deliver a nasty-gram from the compiler. While the rigid structure makes AS3 much more powerful and efficient, it also alienates amateur developers. Don't get me wrong... the simple stuff is still simple (some of it even easier than before). But the advanced stuff is a lot more demanding.
Blessing or a curse? Definitely a blessing once you get the hang of it. I was writing a pretty large and complicated app last night that got into some of the more abstract and less documented areas of AS3... I was not looking forward to dubugging it. However, after writing out all of the code in full, the thing worked on first compile. I was floored. Yes, some experience and a bit of luck is a factor... but I give huge credit to the AS3 architecture for being so rigid and confining. It requires you to be more precise and accountable, which leads to much tighter programming.
So, start tinkering ya'll. I started with creating simple shapes and movieClip objects. It was trivial, but still really good practice. If anyone wants some good starter exercises, let me know. I can make some suggestions about getting off the ground.
SeanCyrusTowel- 01-04-2008
The whole picky when it comes to compiling is really a good thing. It's been many years since I did any compiling, and that was mostly in C++. But if I recall, picky compilers lead to less memory leaks, and less fatal errors.