I’m writing this post out of guilt. I’m working with a contractor today, Charles Schulze, helping him get a working version of one of our API’s. He’s been really patient with us while we get a working build to him that he can build around. We’re all in this walled off area of desks and tables called “The Pit”. It makes it easier to collaborate compared to f’ing cubes. A discussion was going on about AS2 and AS3 differences. Charlie again mentions he wants to get more projects doing AS3. He doesn’t get as many as AS2. I told him if he is doing pure ActionScript 3 all the time, he should be doing Flex work instead of Flash. He laughed.
“Dude, you’re using classes in ActionScript 2… you’re building a mini-app. If you know ActionScript 3, you’re practically an application developer.”
He then looked upset. He didn’t show it, but I could see it. He brought up various scenarios, so I did my pitch on what I think Flex is for and what Flash is for (typically). I threw in the caveat it’s not always that black and white, especially with hybrids like him who can design and code equally well. If you are in a particular industry, it makes it easier to focus on a skill set. For example, if you keep hanging around the agency world doing contract, you’re more app to get bling using your Flash skills. While I’m sure they’d ask for AS3, a lot of OOP and design patterns are useless when you have a week to get stuff done that would take me 2 months. Vice-versa in the software world in using Flex. A lot of the design appreciation just isn’t there, and you cannot use a lot of the skillsets that don’t apply to coding.
He brings up more postulate scenarios, such as doing interactive, design-driven websites. As if on cue, Nick throws in the “doing 3D interface work”. Yeah, I was owned… but I still didn’t think that was justification for putting AS3 in a product meant to encourage upgrades, which then encourages stock holders to see post-merger success, and thusly purchase more stock in Adobe. I look at Flash 8 and go, “Damn, they got that one soooo right. Phat design additions and re-implementation of Script Asisst. Macromedia for the win!”.
He then mentions quietly with a resolute sadness, head down working on his computer, that I made him not as motivated to learn more AS3 than he already knows. I immediately felt bad, like I had erred in communicating and then spent the next 5 minutes un-doing… or rather, re-directing my rallying towards learning AS3 in Flash CS3, not Flex Builder. Sapping passion from another is a major sin.
I explained the immediate benefit of runtime errors. Yes, that dialogue box in your face can belt your self-esteem at times, but nothings more frustrating than an error that just stealthily never appears. Now, you see them when your SWF is running, AND can see the path leading up to their cause of failure. Furthermore, you’ll never have that nagging feeling of “maybe I should optimize my code…”. AS3, when used even with an once of effort towards using strong typing gives you mad speed increases. This won’t necessarily improve your animation speed, but certainly won’t detract from it, especially in games, or complicated menu systems. The days of seeing “Why does ‘parseXML’ freeze my animation?” on mailing lists should be a thing of the past. E4X is slower than DOM (aka XML.childNodes ) … but typically uses less code. Finally, the increased cleanliness of the strong-typing implementation will ensure your code probably works right when you compile, better than AS2. This confidence makes you a better Flash Developer.
Let’s not forget the most important… file size. Flex 2 SWF with a Button component, 126k. Flash CS3 SWF with a Button component, 15k. That assumes your even using the new CS3 components; one you could could be smaller for example. Both Flash CS3 & Flex 2 produced Flash Player 9 AS3 SWF’s run the same speed: fast as nuts.
So, I hope I got Charlie psyched again about getting more AS3 projects. I felt like a dick stealing his joy on wanting to get more into it, and felt I made a valid, applicable case to him to get him back in the mood for it. Hopefully my frustrations at feature choices won’t detract you either. You can learn AS3, reap the rewards, and steer clear of all the OOP & design patterns if you so choose. AS3 alone is still pimptastic in Flash CS3. There is nothing wrong with learning AS3. Just remember AS1 and AS2 are still powerful and a valid part of your arsenal.
Nice read.
I very often have to answer the same questions as Charlie there – “You are AS3 developer so you can also do Flex apps?”. My answer is always the same: Flex is a high-level markup language, it eases the pain for specialized application developers to build their product faster and easier by using pre-built skinable Flex components and utilities. For any custom functionality you *HAVE* to use AS3.
Flex source (.mxml) is converted to AS3 by a compiler at runtime and then played back via Flash 9 player.
If you are making a corporate web app with data tables and charts, or if you need to define application layout fast – Flex is right for you. If not, then the pure AS3 is always the best way to go.
One more thing – Flex Builder 3 has better (unfortunately) error checking / code completion for Actionscript 3 than Flash CS3 – don’t waste your time with it, unless you are really attached to the wysiwyg concept.
Hey Jesse,
Flash/Flex/RIAs/C# or whatever, it only moves forward. Keep up and you are valuable, rest on your heels and you add a expiration date to your skill set.
There’s another reason why there’s nothing wrong with learning AS3. It leads to learning Flex, just like marijuana leads to heroin. It’s a gateway syntax.
‘Sapping passion from another is a major sin’ – Good take, it’s ashame that more peoples blogs don’t try and inforce this message. Keep it coming.
CS3 as a piece of software is rubbish, the panels are very annoying, the coding environment is a joke and its too expensive, but the speed improvements of AS3 make it worth the hassle… usually. I was just reading an older post here about the lack of AS3 to AS2/1 communications. which is an issue for me at the moment. The inability to link an F8 swf to the parent F9 movie in a sensible way means I have to spend a lot of time on setting up F8 assets for AS3. Most designers are never going to learn even basic AS3.
I wish Adobe created AS2.75 which looks the same as AS3 but is more relaxed like AS2, eg, if you forget to add an Event argument to your EnterFrame function, it does it for you and doesn’t give an error. So much time is wasted correcting basic errors which AS2 never worried about. Then people in an agency world could get some or most of the performance improvements, learn the principles and still deliver the project in a rush
Dude, you crack me up. I wish I was there.
Kinda.
Not really.