As2 compiles classes down to prototypes. So feature-wise and speed-wise it's the same thing for the player. Prototype allows slightly better tuning of your code (when to put "this" when not, how to name the getter/setter etc.) but it has little practical benefit.

You can still mix prototype definition with intrinsic AS class "shell" to get AS2 benefits on your prototype code.

AS2 is faster to develop, however, since it's less noise in the written code and better/stricter compiler. So up to you - for small projects it's the same.
For larger projects AS1 would slow you down.

One silly example. I rountrip code between HTML+JS and Flash+AS2. If I type alert() instead of trace() in an AS2 class the compiler says "wait a min. There's no such thing as alert() ..?".

In AS1 it just compiles it and when called fails silently :) saves precious seconds.

Regards, Stan Vassilev


----- Original Message ----- From: "Martin Klasson" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Friday, October 21, 2005 12:38 PM
Subject: [Flashcoders] using prototypes -bad or good?



What is really the opinion on using prototypes now when as2 is being
used?

Prototypes can be used, but should it be used?

I got a friend who like doing prototypes and then making an Extension of
it.
So in the fla-file you can

#include "prototypes.as"

I don't really like the thought of using prototypes nowadays (liked it
when only as1 was the option)

And I really don't like extensions that much either.

I rather see a portability in where you got as-classed instead of
extensions and so on.

I do must admit that I use lacos tween, and that is for now both of and
prototype and an extension -which then is an #include "lmc_tween.as"

What do you think?

/ martin
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to