Appendix A. ActionScript Language Comparison

This appendix compares and contrasts a number of aspects of ActionScript, Java, and C++. The goal is to detail differences in three popular object-oriented programming (OOP) languages, since they're so widely used, and during your career as a programmer you may find yourself moving from one of these languages to another.

This appendix uses a structured format to describe the differences between ActionScript, Java, and C++. ActionScript 3, Java 6, and ANSI C++ will be used during this comparison since those are the current versions as of the writing of this book. The general format will be to present a topic and discuss how it is handled in each of the three languages.

Runtime Environment Concerns

Before discussing the languages themselves, some aspects of their runtime environments will need to be discussed to assist in putting this comparison in context.

Compilation

All three of these languages are compiled languages. ActionScript is compiled into .swf or .swc files that contain ActionScript bytecode. Java is compiled into .class files that contain Java bytecode. C++ is compiled into actual programs — for instance, on a Windows system you will end up with an .exe file.

Runtime Engines

ActionScript bytecode is run in the ActionScript Virtual Machine (AVM). In the case of ActionScript 3, the bytecode is consumed by a Just in Time (JIT) compiler and converted into machine-specific code. Java bytecode is run in the Java Virtual Machine (JVM). It ...

Get Professional Adobe® Flex® 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.