After a few months, I had to switch to AS3 because AS2 was limiting me and making it impossible to achieve my goals.
Now that I know AS3, I can't stop regretting all he wasted time with that nightmare known as AS2.
I never had someone telling me how bad AS2 was or that I should instead learn AS3, and I don't want others to waste months learning an useless, slow, dumb and deprecated language, so here's a pretty resumed list of reasons for you to
Learn AS3 instead of AS2
Note that this is meant for newbies, as any semi experienced programmer can tell that AS2 is worth nothing after taking a look at some sample code.History:
AS2 was a revision of AS1 and while it added some new functionalities, the code compiled to the same bytecode as AS1; it's like covering a pile of trash and building over it.
AS3 uses an entirely different VirtualMachine and rather than being a patch to AS2, it's a new language; a whole restructure.
Adobe's language reference for AS2 explains that "ActionScript 2.0 is a legacy implementation of the ActionScript programming language, and has been replaced by ActionScript 3.0".1
Speed:
Nobody likes slow games; there are few things as annoying as a laggy game.
You can make fast games in AS2 to some extent as long as your code is flawless and super optimized.
AS3 code executes way faster (around 10 times faster) than AS2's code, so while it's still recommended that you work on writing fast code (because AS3 isn't lag free), you won't be facing lag issues as often.
Also, while optimizing AS2 allows you to make decent games, a super optimized AS3 application offers endless posibilities.
Perfect collisions and physics? Check.2 Thousands of particles? Check.3 No way to do that in AS2 without totally killing performance.
Coding:
AS2 allows you to compile pretty much anything you can type. Of course, that doesn't mean it will run or work, it just means that it will silently fail, leaving it up to you to search among thousands of lines of code looking for the cause.
It even allows you to write code inside of objects. In conclusion; it's a hell, an ocean of nonsense where your sanity decreases at the same rate of your chances of achieving your goals.
AS3 enforces OOP: use classes, no more object-code. Type variables, be explicit with datatypes for arguments and return values.
Most important, you can debug if you use AS3, so if you try to compile something with an error, it will fail and tell you what's wrong. Same for runtime; if there's an issue with your logic, the application will throw an exception and point you to the issue, instead of just lagging your computer to death like AS2 applications.
But I'm a beginner and AS2 is easier...
False. The "AS2 is easier" argument is used by people who lack the required skills to be a programmer. If that's your case, you can use tools like Stencyl, which don't even require you to code and will run faster than an AS2 application.4
AS3 may require you to type a couple of extra characters every now and then, but it's actually easier, since it makes sense; everything follows the same logic, you have control over your application and are able to manipulate it at will.
AS2 applications fail for random reasons. ie, your objects may be randomly destroyed, or the same, perfectlty fine AS3 code will produce different results.
As it was mentioned, AS3 favours OOP, so you always know what each object is, what kind of values are expected, where and why. It couldn't get easier than that.
If you want another example of why AS2 sucks, how about being able to transform objects into anything? Or mix them with random stuff?
ie, x=100; x+="hello, world"; x=new MovieClip()["WTF"].a.b.c["omg, god, why!?"]; is considered perfectly logical in an AS2 application. A real world version of that would be to have a coffee machine turning into an elephant's unborn offspring.
If you think that's easy, go ahead... but don't get it wrong; being able to get away with terrible code (that won't run anyway) doesn't mean the language is easier.
Also, the web is filled with AS3 articles and tutorials, and most experienced Flash programmers use it, so you'll be able to solve your issues really fast.
I could simply learn AS2 and then move to AS3, right?
No. As it's been explained, AS3 isn't a patch for AS2. It's a totally different language that was made because AS2 was beyond salvation. There was no way to fix AS2; they had to build it from zero.
Learning AS2 won't help you learn AS3 and insead will make it harder because you'll have to get rid of all the bad practices you got from it.
But this amazing programmer used AS2 to make a great game!
And Bauby wrote a book by blinking his eye, because he was fucking paralyzed!5
Yes. Many great games were done in AS2, because AS3 didn't exist back then, or because those programmers were still learning it but had to keep making games to bring food to the table.
Instead of telling me how many good programmers used AS2 at some point, why don't you link a recent quote of a great programmer who defends AS2? I dare you.
Do you think Adobe spent millions and such a huge team developing, updating and supporting AS3 just because they had nothing better to do? It was created because AS2 didn't satisfy the requirements anymore, and that was some years ago.
Also, they are/were great programmers for a reason; you, as someone just getting into the game development world, don't stand a snowball's chance in hell if you pick such an outdated and useless tool for this job.
Professional programming?
A nice dream and a harsh reality. But it's something most of us want at some point.
If you want to succeed, you'll have to make good games, which involves using a tool that doesn't limit your creativity. You need AS3.
Not enough? Besides making a good game, you need people to play it, know it and share it.
You can't use multiplayer services like PlayerIO or Gamooga. Half of the APIs won't work in AS2 or will cause issues.
More? Less than 15% of the marketed games used AS2 during the last year.6
What about making console-quality games? Not even in your dreams if you use AS2.7
AS3 offers you access to Stage3d and a lot more stufff which can make the difference between a goldmine and just another game.
Farmville 2, Machinarium, Tanki Online... you name it, it wouldn't have been possible without AS3.
Conclusion:
AS3 is...
Faster: Code properly and you won't have to worry about lag.
Supported: IDEs are stopping support for AS2 and all the recent tutorials are for AS3. New APIs and technologies sometimes won't be compatible with AS2.
Popular: iOS, Android, Facebook. The audience increases if you use AS3. So do your earnings.
Easier: If you're a newbie, you'll love how logical and simple it is, plus you'll never run short of free tutorials all over the web. If you already know some other languages, it'll be a matter of getting used to the syntax, as usual.
AS2 is...
worse in every aspect.