The scripting language created by Macromedia (now Adobe) for use with
Flash, a
rich media format that drives most interactive experiences on the Web these days. ActionScript is developed based on the ECMA-262 standard, the same standard JavaScript is based on.
ActionScript was first made available in the
Flash IDE version 4 with very basic controls mostly to control the starting and playing of specific frames. Starting in
Flash 5, ActionScript has been expanded to be full-fledged scripting language and was finally editable within a text editor.
With Flash MX
2004 (simultaneous FP version 7), Macromedia introduced ActionScript 2.0, a much revised version that supports strict variable typing and class-
based construct. AS2 revolutionizes
Flash development and allows large and complex environments to be built while utilizing most object-oriented programming principles.
Adobe (purchased Macromedia in 2006) is currently busy working on ActionScript 3.0, which greatly expands on AS' matured status. AS3 is currently available for
Flex 2.0 development, and is expected to be released for the Flash IDE with version 9.
ActionScript 1.0
function
Foo()
{
this.sucks = true;
}
var
foo = new
Foo();
trace(
foo.sucks) // outputs true
ActionScript 2.0
class org.f.Foo
{
private var $sucks:Boolean;
public function get sucks():Boolean
{
return $sucks;
}
public function Foo()
{
$sucks = true;
}
}
import org.f.Foo;
var f:Foo = new Foo();
trace(foo.sucks) // outputs true