views:

31

answers:

2

I'm new to this language.

But I see lots of people prefer as3 to as2

+1  A: 

AS2 is supported. But it's much less well-structured a language than AS3. AS3 is quite similar to something like Java - proper classes, interfaces, etc. AS2 is a more basic language.

Some artists prefer AS2 because they are not programmers and prefer something simpler, but as a developer AS3 is WAY better. It also has MUCH better library support.

John
also the api was extended, things like rotation and textframework are simply not available in ac2
antpaw
IMO AS3 is similar to what Java was 10 years ago. it is verbous and full of design failures.
back2dos
A: 

AS2 is a much more dynamic language, which is far more open to things as AOP, mocking or meta-programming ... also AS2 is fully prototype-based ...

AS2 as well has proper classes and interfaces ... it's a language that can be well compared to ruby or other dynamic languages, only it supports compile time type checks ...

most people never understood AS2 and don't understand it until now ...

if you are seriously interested in using AS2, I suggest using MTASC as compiler and FlashDevelop as IDE (already comes with MTASC bundled) ... also, you could use haXe to have an expressiveness superceding that of AS3 and compile to AVM1 to have the dynamicity of AS2 ...

the 2 most important features of AS3 are:

  • greater execution speed
  • access to a greater API (I personally find it quite sad the new API never was made available for AS2)

after 3 years of AS3 experience I'd personally advise you not to learn AS3, but rather haXe ... I'm hoping for Adobe to make a move some time soon, but currently the language (not to be confused with the API) has stalled since its very release and all language feature requests on Adobe JIRA are plainly ignored ...

greetz

back2dos

back2dos
Great information!+1.I'm using Macromedia Flash IDE,and I think it's better than others?Because I found FlashDevelop is not a full-stack flash IDE.
@user198729: it depends on what you are up to. you can use Flash IDE and FlashDevelop together if you want. you can a) create assets in the IDE and use them in FlashDevelop b) use FlashDevelop as an editor and compile using the IDE (there are even FD project templates for that) ...if you are planning to write considerable amounts of serious code, then the flash IDE is not the way to go ...
back2dos
Why is the flash IDE so badly remarked?AFAIK,FlashDevelop can only play with pure actionscript,while flash IDE can deal with anything evolved in flash.
@user198729: Flash IDE is not only expensive, but for the lot of money you pay, you get no coding comfort at all. Flash IDE focuses on animation and drawing. and it is one of the best tools around for that purpose. for coding it's a horror, once you are used to proper IDEs. also Flash IDE promotes bad coding style, while FD and other IDEs promote good style, rewarding things as typing and documentation with a kick-ass autocompletion and custom method tips. and .fla is a binary proprietary format, which is bad for version control. last but not least, the IDE compiler is horribly slow.
back2dos
but don't forget AS2 was also one of the messiest, ugliest and inconsistent languages around. HaXe is cool though and I too hope that it becomes the norm.
Allan
@Allan: I disagree. AS2 was less restrictive and many people using it simply didn't have the self-discipline or experience to write good code with it. Most were actually coding AS1 until AS3 came out. unlike AS2, AS3 imposed a new coding style, which is why many people started whining, to discover later on, that writing clean code is cool. Now everyone acts as if AS2 was horrible, and they couldn't have done that before. Most of these people can't even name the core differences between AS2 and AS3. Personally I'm desperately hoping for AS4 to turn more AS2ish. Or for haXe to win the race. :)
back2dos
In what way was AS2 less restrictive? I am curious as I have always been an OO programer and so of course AS3 was much more Object Orientated than AS2 which is why I prefer it. My memory is sketchy but I recall in AS2 having to use the delegate class to get a function for a button to be able to use a class member variable. Ugh. Also are there any cases where prototype programming for example would be a better tool than OO programming. Maybe this would make a good blog topic ;-)
Allan