W3C.US

  • Increase font size
  • Default font size
  • Decrease font size
Home Tutorial Actionscript Book A brief history about actionscript

A brief history about actionscript

E-mail Print PDF

 Early syntax of ActionScript 1 with Flash 3 was simple and verbose and functionality was based mainly around frame navigation and basic mouse interaction. This remained consistent until about Flash 5 where ActionScript assumed a form more similar to JavaScript. This provided a great deal more functionality and a "dot-syntax" for variable and method access. ActionScript also became a prototyped language allowing for simple OOP functionality similar to that available in JavaScript. This was enhanced in the following release of Flash, Flash MX (6).



Flash MX 2004 (7) introduced ActionScript 2.0. There were two major improvements that came with ActionScript 2: variable data typing and a new class syntax. Variable data typing allowed you to specify what kind of value your variables contained, whether it be a number, a string, or any other kind of object or value. This typing association was strictly for compile-time debugging. What that meant was that any type you associated with a variable would only be used to check for errors when you compiled or published. If no conflict was found during the compilation process your SWF would be created with all the typing information stripped from it and the ActionScript inside would run without any understanding of the types you assigned to them in your original code. Though this provided no advantage to the Flash Player during playback, it did provide Flash authors a helpful tool for debugging larger, more complicated applications.

The new class syntax was used to define classes in ActionScript 2 similar to those defined for languages like Java. Though Flash still didn't really support classes beyond that in the form of prototypes (in the end, ActionScript 2 still basically gets compiled to ActionScript 1), this new syntax provided a familiar style that was helpful for people migrating from other languages and provided a more concrete way to organize class definitions within separate AS files and packages.  

That brings us to Flash CS3 (9; not much in terms of advances in ActionScript happened with Flash 8) with ActionScript 3.0. Here we have a new ActionScript language that not only received a new version number but also a new virtual machine – the underlying software within the Flash Player that executes ActionScript during playback.

Both ActionScript 1 and ActionScript 2 use AVM1 (ActionScript Virtual Machine 1) as they are essentially the same in terms of needs for playback. Remember, ActionScript 2 mostly only added compile-time type checking and a new syntax which essentially became ActionScript 1 when compiled. ActionScript 3 runs in a completely new virtual machine called AVM2 (or sometimes AVM+) designed specifically, from the ground up. to execute ActionScript 3 and only ActionScript 3 code. As a result not only can ActionScript 3 movies not directly communicate with ActionScript 1 or ActionScript 2 movies, but you may find that the changes in ActionScript 3 to be much more profound than the jump even from ActionScript 1 to ActionScript 2.