ActionScript

From Mario Fan Games Galaxy Wiki

ActionScript is an object oriented programming language used to build RIA (Rich Internet Applications). ActionScript runs just like Java, in a Virtual Machine, also called Actionscript Virtual Machine or simply AVM.

ActionScript is the main language used in Adobe Flash as a script for controlling the timeline and manipulating the variables and the Program itself.


Actionscript 2.0

As for the language itself, it's pretty basic, there aren't integer, float, short and byte types of variables, instead, they are just referred to as Number, a Number is a double precision floating point number.

Here is an example of variable declaring in ActionScript 2.0:

var grav:Number = 0;
var speech:String = "String this is";
var randNumbers:Array = new Array('123', '32', '348');
var finished:Boolean = false;


ActionScript 3.0

ActionScript 3.0 is referred as an actual programming language, it's functionality is wider than the old version, the coding rules got stricter and the coding itself was totally changed.

Here is an example of Class constructors (extended classes), Class constructors were not possible until ActionScript 3.0:

class myClassA {} 
class myClassB extends myClassA {} 
 
var objA:myClassA = new myClassA(); 
var objB:myClassB = new myClassB(); 
var arr:Array = new Array(); 
 
objA = objB; // Conversion succeeds. 
objB = arr; // Conversion fails.


ActionScript Versions

   2000–2003 - ActionScript 1.0
   2003–2006 - ActionScript 2.0
   2006–today - ActionScript 3.0

Actionscript 1.0

ActionScript 2.0

  • Started types syntax and classes.

ActionScript 3.0

  • Launched with Adobe Flex 2.0 and Flash Player 9, added the new Virtual Machine.