Skip to content

ProgrammingWithActionScript3

Zwetan Kjukov edited this page Jan 20, 2016 · 3 revisions

Programming With ActionScript 3.0

One of the greatest motivation behind the Redtamarin project is to be able to write code in ActionScript 3.0 (AS3) and execute it in some area it was not meant to or considered impossible or even maybe useless.

We simply love AS3 :).

I would describe it as a good balanced hybrid language
which can go from quick dirty scripts of few dozen lines
to full blown type-safe structured programs of thousands.
@zwetan

But let's face it, no language or platform is perfect, still here some great advantages of ActionScript 3.0

  • The language itself is open-source in that its specification is offered free of charge.
  • The language compilers (ASC, MXMLC) are open-source part of Apache Flex.
  • The ActionScript Virtual Machine (AMV2) has been open-sourced,
    see project Tamarin, the very reason Redtamarin exists.
  • Apache Flex SDK open-source
  • Adobe AIR SDK free
  • Developers have worked with the language for at least a decade (released in 2006).
  • Numerous commercial and open-source projects/libraries have been developed with AS3.
  • Numerous tools and other IDE support ActionScript 3.0 out of the box.

But to us the killer feature is the combination of AS3 + AVM2
a great language that run in a great virtual machine.

History

In the ActionScript 3.0 overview by Gary Grossman and Emmy Huang, we can read the following

ActionScript 3.0 is a powerful, object-oriented programming language that signifies an important step in the evolution of the capabilities of the Flash Player runtime. The motivation driving ActionScript 3.0 is to create a language ideally suited for rapidly building rich Internet applications, which have become an essential part of the web experience.

Earlier versions of ActionScript offered the power and flexibility required for creating truly engaging online experiences. ActionScript 3.0 now further advances the language, providing superb performance and ease of development to facilitate highly complex applications, large datasets, and object-oriented, reusable code bases. With ActionScript 3.0, developers can achieve excellent productivity and performance with content and applications that target Flash Player.

ActionScript 3.0 is based on ECMAScript, the international standardized programming language for scripting. ActionScript 3.0 is compliant with the ECMAScript Language Specification, Third Edition (ECMA-262). It also contains functionality based on ongoing work on ECMAScript Edition 4, occurring within the ECMA standards body.

ActionScript is executed by the ActionScript Virtual Machine (AVM) built into the Flash Player. AVM1, the virtual machine used to execute legacy ActionScript code, powers Flash Player today and makes possible a wide range of interactive media and rich Internet applications.

However, developers have started to push AVM1 to its limits; their project requirements now demand a major breakthrough. ActionScript 3.0 introduces a new highly optimized ActionScript Virtual Machine, AVM2, which dramatically exceeds the performance possible with AVM1. As a result, ActionScript 3.0 code executes up to 10 times faster than legacy ActionScript code.

The new AVM2 virtual machine is available in Flash Player 9, and will be the primary virtual machine for ActionScript execution going forward. The older AVM1 will continue to be supported by Flash Player for backwards compatibility with existing and legacy content.

Editors and Tools

A list of known editors and other IDE supporting the ActionScript 3.0 language

But really any code editor would do as most of them support at least the ActionScript 3.0 syntax highlighting or can be customised to add it (or an extension/addon already exists), in fact we use often use nano to edit AS3 on the command-line.

Tools

Resources

Clone this wiki locally