ActionScript 3.0 Day 1 – Concepts and SyntaxSunday, February 22nd, 2009 with 1 Comment »

I decided to start learning ActionScript today. I will document what I learn as I make my way through ActionScript books and tutorials.

Compilation

  • ActionScript code must be condensed into a binary format known as ActionScript bytecode
  • ActionScript bytecode is wrapped in a binary container known as a .swf file, which is what is executed by Flash runtime
  • Thus, a compiler is required to convert ActionScript to ActionScript bytecode and ActionScript bytecode to .swf

Two-Level Compilation

  • The first compilation is converting ActionScript into a format understood by the Flash runtime (done by the developer)
  • The second compilation is the Flash runtime automatically compiling the ActionScript bytecode to a format understood by the computer hardware (using just-in-time compilation)

Syntax
The syntax of ActionScript 3.0 is similar to Java.  A syntax comparison between Java 5 and ActionScript 3.0 can be found here.

The Attribute Internal
Internal is more restrictive than Public, as the code cannot be in a different package than the definition.  It is more lenitant when compared to Protected, as it can be in a different class in the same package as the definition.

Copies and References
Copies are created for String, Boolean, Number, int, or unint.  Custom classes and all other classes use references.

Day 1…a bit disappointed
Both the books I’m reading is heavy on the syntax without any programs to build and try out.  Maybe it will get better in the next 1 or 2 chapters.

Get updates as often as we post! Subscribe to our full feed or comments feed.