Learning Actionscript 3.0

Lately, I have been pushing myself to do more and more of my Flash Projects using Actionscript 3.0. I know I am a bit behind climbing aboard. I am a designer by trade, but am not too afraid to learn new things. I try to keep up on the necessary technologies for my industry.

Now that the at least Flash Player 9 penetration is used in most browsers, corporations are more willing to publish AS3 code. This has been true for a little while now, but some companies are difficult to convince that the adoption rate for the newer players has exponentially gotten quicker and quicker. Now there are simply no more excuses not to learn the new technology; I simply must learn it.

I have been converting some Actionscript 2.0 code I wrote three years ago to parse through an XML file display the hundreds of products a user can choose from to order. The order is sent through a form using LoadVars. That experience was such a great learning experience for me that it boosted my confidence to continue forth learning more and more Actionscript. AS3 does such a better job at parsing XML. It is so fast and easy to use. Instead of iterating through each of the Child Nodes of the XML Object, you can access them directly using dot syntax. This makes working with XML a breeze.

The learning curve for AS3 has been a little bitt of a challenge, but coming from a good base knowledge of AS2 has made it easier. Some designers have come up to me and asked if they should learn AS2 or just jump right into learning AS3. I am a little torn on the issue because I feel that AS2 was easier to learn the simple things such as button interaction and URL linking. Yet soon AS2 will be a thing of the past and they will eventually have to learn AS3 anyway. They are different enough that it is almost like learning a new language, although simple programming concepts are the same such as loops and setting variables.

I love an article by Collin Mook published on O’Reilly InsideRIA titled “The Charges against ActionScript 3.0.” It really nails many of the issues I was having with AS3. The biggest challenge I was running into was with his number 3, “Casting DisplayObject.parent makes controlling movie clips hard.” This is so true. Why wouldn’t the player be able to recognize what type of Display Object it is, it should be implicit and already know, because it is a child of the parent. Parents should tell their Children about their ancestors (it is important to the Chinese) it should be the case for the Flash Player. You would think type casting would help with this, but it doesn’t. To reference a parent you need to specify its type. For example, if it is a Sprite use: Sprite(parent). If it is a custom class even based on a Sprite you need to state the Class Type: MyCustomClass(parent). For backing up two levels the Class Type you need to reference is the one that is two levels back. Within the comments one writer wrote that he teaches his students not to even use parent at all in writing a program. I’m not sure how this could be done, unless everything resided in one Class. What would be the purpose of multiple classes then?

I will continually push forward on my AS3 skills and am confident that it will pay off in the long run. I am tying to stay ahead of the curve. I don’t know how designers that use Flash, HTML, and other such technologies can survive without understanding the capabilities out there they can design for. They are only hurting their own designs buy limiting their knowledge of the limitless possibilities yet to be discovered through technologies. I am a creator. I know no limits.