Forum Topic: Are you using Actionscript 2 or 3 ?

(497 views • 44 replies)

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
Happy

kebabsoup

Reply To Post Reply & Quote

Posted at: 10/16/08 10:50 AM

kebabsoup FAB LEVEL 15

Sign-Up: 09/22/08

Posts: 151

Mhh....It's interesting to see the different opinions here. One of the main reason I'd like to learn AS3 is because of the "10x faster code execution" adobe boast on their website. But is it really true? Can someone confirm that AS3 is faster than AS2?


None

Ansel

Reply To Post Reply & Quote

Posted at: 10/16/08 10:57 AM

Ansel LIGHT LEVEL 23

Sign-Up: 09/02/06

Posts: 4,068

when I do programming (not often at all) it's usually just redirecting between frames and things. I'm still using AS2 because I'm not at all a programmer and it's still the easiest for me. I have CS3, but just out of habit I always start an AS 2.0 document :3

BBS Signature

None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 10/16/08 11:25 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,427

At 10/16/08 10:50 AM, kebabsoup wrote: Mhh....It's interesting to see the different opinions here. One of the main reason I'd like to learn AS3 is because of the "10x faster code execution" adobe boast on their website. But is it really true? Can someone confirm that AS3 is faster than AS2?

Yes, really, really obviously.

#ngprogramming at irc.freenode.net
haXe | Keel imperative | Spyro! | Thru you


None

Dabzi

Reply To Post Reply & Quote

Posted at: 10/16/08 02:59 PM

Dabzi LIGHT LEVEL 15

Sign-Up: 12/09/06

Posts: 15

AS3, I would reccomend anyone to make the switch for AS2 if they are making games or any heavily interactive applications. I think AS2 is very useful for non-programmers who just want to add simple interactivity to their movies, but for making things such as games, AS3 is the way to go.

At first it seemed like a big leap, but it's actually quite easy to pick up. AS3 is stricter, but that helps a lot in the long run.


None

Archon68

Reply To Post Reply & Quote

Posted at: 10/16/08 05:46 PM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,474

I think i'll learn AS3, just for the heck of it. CS4 came out, and I plan to get that, and I doubt if i can use the new features without learning a new language.

I code in AS2, in case I forgot to mention it.

BBS Signature

None

mwmike

Reply To Post Reply & Quote

Posted at: 10/16/08 05:51 PM

mwmike EVIL LEVEL 18

Sign-Up: 02/23/08

Posts: 4,314

I use AS2. I want to someday learn AS3, but I even can't be asked to learn much more about AS2, which I already know a few simple actions with.

Plus I have flash eight, which isn't compatible with AS3.

-

BBS Signature

Expressionless

kebabsoup

Reply To Post Reply & Quote

Posted at: 10/17/08 04:22 AM

kebabsoup FAB LEVEL 15

Sign-Up: 09/22/08

Posts: 151

Ok...So if we sum up now:

AS2 is more newbie-user-friendly, there are tons of tutorials and code to copy-paste into a game. But it's a real blaspheme to Harcore coders because you don't exactly control the logical way of thinking of your computer. So AS2 can be nice to do simple stuff like pre-loaders, scene changing and movies.

AS3 is more efficient, it has more features, it executes codes at a high speed in a very logical way. Logic but very complex, the computer won't help you, everything is in your hands and you have to deal personally with all the exceptions that may occur. It's also pretty recent and there aren't a lot of tutorials. (But I found very good books, including a very good free eBook but in french) This is for Chuck-Norris-like-coders but it's awesome when you harness it.

Everybody agree? Something to add?


None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 10/17/08 04:48 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,427

AS3 is not 'hardcore', it is a simple scripting language. It doesn't have 'tutorials' because it's easy. AS2 has 'tutorials' because idiots that have some limited ability to come up with 'codes' make them with step-by-step instructions for other idiots so they could follow and then feel like they have the slightest coding ability. These idiots are the majority of the people that posted here saying they use AS2 and their reasons for not using AS3. As Luca said, the general reasons are either actual programming inabilty or ignorance. I don't mind you being an idiot if you don't like this common logic stuff or anything, just don't talk to me.

#ngprogramming at irc.freenode.net
haXe | Keel imperative | Spyro! | Thru you


None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 10/17/08 05:28 AM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

AS2 represents the last iteration in the original Actionscript paradigm; allowing designers to add interactivity to Flash projects with minimal effort and knowledge. You won't find much that truly qualifies as a "tutorial" for AS2, at least not here, you'll find (usually not very well-written) snippets for copy-pasting with a bare-bones explanation (if you're lucky) of what the code allegedly does, assuming the one who posted the snippet didn't just copy and paste it from Flashkit or actionscript.org.

AS2 is not anathema to the "hard-core," think of it like the senior citizen of the two (old, slow and prone to shit itself with no warning). You can write perfectly servicable code in AS2, but that requires you to know what you're doing, and many times the things you want to do require hacks, kludges and similar workarounds to otherwise beat the Flash Player into a submissive state where it will, to the best of its ability, do what you want.

AS3 is the first iteration of the new Actionscript paradigm; a robust, class-based backend that demands from you that you follow the rules in exchange for performance that, quite simply put, makes AS2 look like the oxygen-tank-carting, walker-using fossil it is. If you know what you're doing, you can write efficient code with (comparatively) high performance without requiring a hack everytime you want to do something complex. You won't find a lot of AS3 script reposi...err...tutorials because, as Gust said, the syntax is easy to pick up and if you have basic-level programming knowledge you're three-quarters of the way home already.

The question comes down to the legwork you're willing to do. If you actually want to learn a language and get the fundamentals of programming, you will get more out of AS3 than you ever could out of AS2. If that type of effort doesn't appeal to you and you think wanting to make a game entitles you to do so, yeah, start copy-pasting scripts in AS2.

Just don't be surprised when, should you hit a snag or otherwise break the code, the people who try to help you don't have a single clue what they're talking about and the people who know what they're doing don't have much to say to you.


None

KaynSlamdyke

Reply To Post Reply & Quote

Posted at: 10/17/08 05:36 AM

KaynSlamdyke LIGHT LEVEL 16

Sign-Up: 06/25/04

Posts: 4,926

Sitting on the bleeding edge only gets yourself cut.

While there's a huge market for AS3, there's no reason to not know how to do the effect you're after in AS2. Or in Java. Or in Silverlight. You never know what's going to be requested from a client.

If you're just doing things for the hell of it, learn AS3. Otherwise, learn everything.

Current build for ThreedeeTiles : Monkey
Previous: Lamprey, Mountain Goat (Dead Fork)


None

liaaaam

Reply To Post Reply & Quote

Posted at: 10/17/08 05:40 AM

liaaaam NEUTRAL LEVEL 22

Sign-Up: 12/11/04

Posts: 14,542

There are tutorials for AS3, they're just rarer than AS2 because it's so new. Although the documentation you get with Flash is a LOT better than anything you'll find in a tutorial.

As a speed test, I'll do a simple bit of code in each language (which will show you how similar they are I think >_>) and I'll say what speed they were.

AS3:

var accumulate:int = 0;
for (var a:int = 0; a<100000; a++) {
	accumulate+=a;
}
trace(getTimer());

AS2:

var accumulate:Number = 0;
for (var a:Number = 0; a<100000; a++) {
	accumulate+=a;
}
trace(getTimer());

See the only thing I changed was the variable type from Number (AS2) to int (AS3), because it would be unnecessary to use Number as that is the equivalent of "double" (in most other programming languages) which can store several decimal places (12 with flash I think), which is an unnecessary amount of accuracy since we're using only whole numbers. Also note that the speed only decreased by 1 millisecond when I ran the AS3 version using Numbers for both accumulate and a :)

Speeds:
AS2: ~350 milliseconds
AS3: ~5 milliseconds

Now that's an increase in performance by 70x.. not f-ing bad, yo.


None

Ben-Fox

Reply To Post Reply & Quote

Posted at: 10/17/08 05:59 AM

Ben-Fox LIGHT LEVEL 07

Sign-Up: 12/27/03

Posts: 571

int and uint are practically worth the price of admission for AS3 by themselves. ^^


None

mayoarm11

Reply To Post Reply & Quote

Posted at: 10/17/08 12:32 PM

mayoarm11 NEUTRAL LEVEL 17

Sign-Up: 06/13/07

Posts: 1,013

2 > 3 in any mathematical equation.

Awesome turret game in the making, featuring 85 uniqe turrets: News post

BBS Signature

Happy

kebabsoup

Reply To Post Reply & Quote

Posted at: 10/20/08 07:31 AM

kebabsoup FAB LEVEL 15

Sign-Up: 09/22/08

Posts: 151

Thx for your answers all! I think I'll try to learn AS3 with books from the beginning, instead of trying to figure out AS2 with a patchwork of copy-pasted code.


None

xWELSHxDRAGONx

Reply To Post Reply & Quote

Posted at: 10/20/08 02:05 PM

xWELSHxDRAGONx NEUTRAL LEVEL 07

Sign-Up: 04/13/06

Posts: 518

At 10/20/08 07:31 AM, kebabsoup wrote: Thx for your answers all! I think I'll try to learn AS3 with books from the beginning, instead of trying to figure out AS2 with a patchwork of copy-pasted code.

And thats the best option.

You can listen to other people and all the negativity they have towards AS3, but eventually all youll find is they are not remotly seriouse about programming, and need to fausly justify their decision of not learning AS3 with a load of excuses that are utter rubbish, when the only truth is they have no need to get better, and/or they have no time and/or they are lazy.

There is not a single draw back to AS3.
Its more than 10 times faster.
The coding is much more consistant.
Id argue you could code a game in AS3 faster, but for sake of it just being my opinion ill say both lanuages are equally time consuming.
AS3 is more of a standard lanuage - as i said before, AS3 and c# are almost identical in syntax.
AS3 gets more features.

AS3 is not harder - its just differnt from AS2. Som1 who learnt AS3 and then learnt AS2 would ahve a equally difficult time.

And 1 final point:
Has any1 who has learnt and become effiecent in AS3 ever said AS2 is better?
Has any1 who can work well in AS3 ever choosen to go back to using AS2?


All times are Eastern Standard Time (GMT -5) | Current Time: 07:38 PM

<< Back

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!