He encontrado esto en Flashmagazine:

Actionscript 2
The biggest new feature by far is the introduction of Actionscript 2 (AS2). 
Only available in the Professional version this is Macromedia's attempt to 
have Flash taken seriously as an application development tool. For the most 
part you can't use AS2 in the AS1 Actions window. 

Although it uses all of the same classes and methods of AS1 it is structured 
and written differently. AS2 is entirely class based. Applications are built 
up in OOP style through the use of inheritance. Classes and interfaces are 
created in a dedicated Actionscript editor and are stored in separate external 
( .as ) files - one file per class. The structure and language is extremely 
similar to Java and in fact you could learn a lot about AS2 by reading books 
on Java.

Actionscript 2 is strongly typed and ECMA-262 strict mode compliant. This 
means it's case sensitive, and supports public and private variables. The 
existing Flash classes are said to be intrinsic but can be extended by the 
user to inherit their functionality. Static class and variable declarations 
are supported (as are dynamic) and inheritance is built up through the use of 
the new implements (for interfaces) and extends (for classes) keywords. 

The import keyword allows reference to other classes and objects within your 
own classes. Property hiding is implemented through the use of public and 
private variables and the use of declared get and set accessors.

Variables can (and should) have a defined datatype, as should the input and 
output of functions. A function that does not return a value can be defined as 
void. This tight framework allows the compiler to perform far more rigorous 
error checking than is possible in AS1. Java developers will be very familiar 
with this form of exception handling - if the compiler encounters a problem 
then it throws an Error. Error prone sections of code can also be wrapped in 
try, catch, finally statements.

Although the two languages are now closer than ever, not all Java conventions 
have been implemented. There is no formal declaration of abstract or final 
classes, and although method overriding is supported, overloading is not. None 
of these will cause any problems but it's worth being aware of. Both 
communities will have a lot to learn from each other over the next few years.

In brief, AS1 is to Javascript what AS2 is to Java. AS1 is a scripting 
language that plays it fast and loose and AS2 is a formal structured 
programming language designed to be robust enough for application development.

If none of that made any sense then you probably don't need it - AS1 should do 
you fine. But 'real programmers' are gonna love it!
<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a