Hi, I just started learning how to code games in flash using a tutorial that was for action script 2. I am wondering if you can accomplish enough in action script 2 or if I should just learn how to use 3. I heard you can do a lot more with action script 3 but is it really that important for me to switch? (I am not going to make any 3D games).
ActionScript 2 is a rough language with a very hacked on OO system and poor typing.
The ONLY reason to still use it is if you are maintaining an old flash app. Don't use it today. AS3 is MUCH better.
My suggestion would be to learn AS3, its fully object orientated, and a natural step forward from AS2. We have recently inherited a bunch of flash projects that are one huge mess of AS1 and AS2 and are having problems finding people who would take on the task of rewriting everything in AS3.
If you are looking for maintainability, use of the best tech you possibly can, and want to learn to write good OO code, definitely go down the AS3 path.
Another reason to use AS3 is because it makes displaying and interacting with things onscreen easier to code.
Some major improvements in AS3:
- Let's say you have a MovieClip
mcOuter
that contains another MovieClip,mcInner
. AS3 makes it easy formcOuter
to receive a mouseover event when you mouse overmcInner
. - AS3 uses closures, which means that event handling functions (e.g. for mouse over) work right without resorting to Delegate.
Generally, the functions and classes are much better organized in AS3 than in AS2.