Friday, February 15, 2008
Yes, AS3 is very different than AS2. One of the major hurdles for those comfortable with AS2 is going to be all of the various class imports. Where before you could simply call on some methods of objects, etc. now you need to import classes before using them. Knowing which you might need is the first thing you should start investigating if you're new to AS3. For real.
AS2 and AS3 aren't totally different on the face of it, but knowing how they are different on the face and how to translate what you did with confidence in AS2 to AS3 is going to save you tons of time. AS3 is all about events (yay!), so learn the ins and outs of the event model. Learn the packages. Really well. It will save you a lot of searching later on when you can't quite figure how to tackle something.
In a few hours something I did regularly in AS2 was converted to AS3 and while I had to do some googling to find out which exact packages I needed, when the day was done I felt like I had just coded in a pretty mature language. My code looked pretty clean & I started the whole MVC thing in more earnest even though I didn't really need to do it. I just felt more organized so it was a natural progression.
There are many things I love about the DisplayObject model, and a few things that equate into more work. Its surely less hacky... which can sometimes be a bad thing when you want to speedily create something. But ultimately its so much better. And if its simply speed one wants (in coding, not execution), AS2 is still an option since the new player contains virtual machines for AS1/2 and also AS3.
So now playtime is over and my FlashDevelop has never felt so good. I could go with FlexBuilder too, but then I'd get a little too sucked in and want to deploy a Flex application. Sticking with IDE compiling for the time being on my application. If it works out well, I'll make a few different Views for it and slap it all into Subversion. This is a nice way to force myself into learning AS3 to a better degree than playing with whatever technique I'd fancy (ie. E4X), I have put myself under the gun, I need to deliver.
Pressure and the desire to learn will teach myself AS3 at an accelerated rate. And with Flex/Air goodness, AS3 is the name of the game. Period. I hope I don't touch AS2 again.
1 Comments:
-
John said...
-
“Its definitely a lot easier to work in AS3 because things are far more consistent than AS2 - particularly when dealing with components and external classes. The one thing that bugged me when switching originally was all the "complaining" (aka run-time errors and casting issues), that I would run into when I was just used to having AS2 fail silently. It was something I had to get used to dealing with (IOErrors etc). But I definitely remember getting pissed on my first AS3 project and yelling "I know its bad -- but I want it that way". Unfortunately, I have to still deal with AS2 for an older Flash Player 7 hardware project, but I try my very best not to do any AS2 stuff for my new projects.
- John O”








