PDA

View Full Version : AS2 & AS1 ... what is better?



▄▄▄
November 10th, 2005, 01:40 PM
I have read the tutorial of senocular aboute OOP with AS2 and it sais that AS2 is converted to AS1 when compiled... so, why to use it? or, why to learn it? is nessesary?

Ok. Thanks!

senocular
November 10th, 2005, 01:41 PM
no, its not necessary, but it often allows for better organization and cleaner code.

▄▄▄
November 10th, 2005, 02:49 PM
if I in some moment of my life decide to start learning java, it will be better for me to use AS2 now? i mean, for the coding syntaxis and stuff. Bicouse AS2 use define, public, private... so for learning porpuses, AS2 syntaxis is less far from a real(i'mean C++ , Java , C#) lenguage that AS1

G
November 10th, 2005, 02:53 PM
first of all AS is a legit language :)

AS 2 is probably more relevent if you are looking to into Java for example, but Java does things differently to AS so theirs a learning curve there but at the core of it they areboth OO languages.

Stratification
November 10th, 2005, 03:06 PM
From Java to AS 2 would probably be smoother. It'll prep you for AS 3 also, which will be a reality next year and should offer some significant performance improvements.

▄▄▄
November 10th, 2005, 03:09 PM
look this link G:

http://www.tiobe.com/tpci.htm

and tell me if you see actionscript even close to Java or C++ o rsome other *cof* *cof* real? lenguage

Stratification
November 10th, 2005, 03:15 PM
Well, Actionscript is very similar to Javascript which comes in at 9 on the list. Javascript and Actionscript are going to become more and more similar too, especially since Macromedia is on the board for ECMAScript, which is what they are both based on.

GPP
November 10th, 2005, 08:12 PM
Question: Where did you read that it is converted to AS1...

▄▄▄
November 10th, 2005, 09:35 PM
I have read the tutorial of senocular aboute OOP with AS2 and it sais that AS2 is converted to AS1 when compiled... so, why to use it? or, why to learn it? is nessesary?


Like i said before, in the OOP AS2 tutorial of senocular

MichaelxxOA
November 10th, 2005, 11:40 PM
Actionscript in general gets compiled down to bytecode, AS1 and AS2 both get compiled down to the same bytecode. The benefit of using one over the other is more on you then on the language, if you plan on learning Java I would suggest learning AS2 and actually creating your own objects. You will find that you will become more efficient and will start approaching problems with a different perspective once you get into the habit of thinking in an object oriented way. You will ( if you actually learn OO design ) begin to create far more extensible and scalable applications, and you will learn to port many specific types of functionality so that you can use it in later projects, and that means far less code for you to write.

As to your comments about C++ and Java and Actionscript.. why don't you look at the purpose of these languages they are FAR more different then you are making them out to be. If Macromedia made Actionscript with the intent of it being a platform application level language then you would see it being compared to C++ and Java. The only reason you have ever seen it compared to Java is the fact that it looks at first sight as if it is built directly off of Java, with many similar keywords and such, hell Actionscript was from what I can see created and has since it's creation become more and more like Java, almost as if they were planning on doing it from the word go.

And the problem with Actionscript right now is that it is a language used mostly by kids, we don't have many computer scientist in our community willing to share their knowledge about not only actionscript but some of the how-to's and why things function in a certain way. That's why you should be grateful for people like Senocular who is extremely intelligent and seems to not have the slightest problem helping people.

While we are on the topic of Java, I have been building some of the useful Java Datastructures in Actionscript I plan on distributing a datastructure utility package out here pretty soon. Is anyone interested?

I'd really like to see some people incorporating LinkedLists and HashTables and Iterators. Alright well I'm out take care guys.

-Michael

kritikal
November 11th, 2005, 12:44 AM
I'd be pretty interested Michael, would there be a way of knowing when those Datastructures are released?

MichaelxxOA
November 11th, 2005, 12:56 AM
I will have the LinkedList and ListIterator ready within the next 2 or 3 days I will post it in Source when I have it ready, then I will post updates. Or maybe I should make a page for it. I plan on releasing alot of what I will be working on. I'll get to you soon, Take Care.

-Michael

kritikal
November 11th, 2005, 01:01 AM
:thumb: perfect, if you plan on releasing a lot of things and updating them often you should consider having a small blog or something

senocular
November 11th, 2005, 06:08 AM
I know someone else out there also has a collection of such structures, linked lists I remember specifically. You can probably google for them.

You can also find all kinds of other AS libraries out there. Im pretty sure there are a few are on source forge and osflash.org

--

Also, in terms of comparing languages, AS is really best compared to JavaScript. It was that which its syntax from after Flash 4 was based (ECMAScript). The move towards AS 2 was, in a way, to make AS more Java-like in syntax to help Java developers make the transition to Flash. AS2 is still not Java nor C++ and still uses prototyped inheritance etc.

▄▄▄
November 11th, 2005, 01:39 PM
And the problem with Actionscript right now is that it is a language used mostly by kids, we don't have many computer scientist in our community willing to share their knowledge about not only actionscript but some of the how-to's and why things function in a certain way. That's why you should be grateful for people like Senocular who is extremely intelligent and seems to not have the slightest problem helping people.


i personaly hate that kind of comments... thanks anyway.

MichaelxxOA
November 11th, 2005, 04:17 PM
@senocular:

Yeah there is the ASLib, the only problem I have with this is it is a collection of a few data structures. The coolest thing about datastructures in Java is that they all share a common framework and each collection also supplies an iterator, and ASLib doesn't offer that. ASLib still looks very cool, I just want more then it offers.

@: The guy who started the post because I can't type his name ;)

I'm sorry if I offended you I honestly wasn't talking about you, I was just telling you something that I have observed. Our Flash Community consists mostly of kids or people just learning programming, there is NOTHING wrong with this. When I said problem I meant as in the reason people are giving AS a bad rap is the same as JavaScript. When JavaScript first came out there weren't many "real" programmers using it, so of course the language isn't being used to it's full potential. Anyway, I'm not going to apologize to much, every one who has posted their opinion to you you've had something to say about.

-Michael

senocular
November 11th, 2005, 04:32 PM
we just call him '3 lower half blocks' or 'thick line' :beam:

Stratification
November 11th, 2005, 04:35 PM
Thick line has a nice ring to it :D

MichaelxxOA
November 11th, 2005, 06:32 PM
haha, I seriously sat there looking at the keyboard for at least an entire minute going.. hm... how am I going to do this ;).

-Michael

▄▄▄
November 12th, 2005, 06:51 PM
lol :lol: