all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

Actionscript 1 vs. 2



Actionscript 1 vs. 2 Lmotiv
5/30/2005 8:53:50 PM
flash actionscript: Hi, I am starting a new project with flash and I dont know should I use AS 1 or
2. I am going to create a set of UI components and I dont know which version is
more efficiency AS1 or AS2. I am not going to use those UI v. 2 components
because they are not what the customer needs. So, what are the benefits of
ActionScript 2? What AS 2 has, that AS 1 dont? Is AS 1 faster than AS 2? Well,
the big question is, why should I use AS2?

Thanks!
Re: Actionscript 1 vs. 2 David Stiller
5/30/2005 11:32:19 PM
Lmotiv,

[quoted text, click to view]

Remember that scene in The Wizard of Oz? The Wizard says, "Pay no
attention to that man behind the curtain!" Dorothy and gang look anyway,
and they see that the Wizard is actually ... just a man.

In a certain sense -- behind the curtain, so to speak -- ActionScript
2.0 is the same thing as ActionScript 1.0. The same. Technically speaking,
both languages compile down to the same bytecode, which is why ActionScript
2.0 is available to Flash Player 6, even though AS2 wasn't available to the
IDE until Flash MX 2004 (concurrent with Flash Player 7).

So, what makes them different? To my thinking, the main benefit to
using AS2 is because it gives you *something* of the feeling you'd have if
you were working with Java or C#. It is perfectly possible to enter an
object oriented paradigm with AS1, but it is prototype-based in that arena,
the same as if you were writing OO code for JavaScript. In AS2, your code
is class-based, which leads you, a Flash developer, along a similar path
taken by Java and C# developers.

For a great introduction to AS2, see Joey Lott's three-part primer here.

http://www.person13.com/articles/


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

AddThis Social Bookmark Button