Jump to content

ActionScript

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 217.244.1.131 (talk) at 08:08, 12 March 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

ActionScript is an ECMAScript-based programming language used for building Macromedia Flash movies and applications. Since both ActionScript and JavaScript are based on the same ECMAScript syntax, fluency in one easily translates to the other. However, the client model is dramatically different: while JavaScript deals with Windows, Documents and Forms, ActionScript deals with MovieClips, TextFields and Sounds.

ActionScript achieved something resembling it's current syntax (retroactively named ActionScript 1.0) in Flash 5, the first version of Flash to be thoroughly programmable. Flash 6 broadened the power of the programming environment by adding many more built-in functions and allowing more programatic control of movie elements. Flash 7 introduced ActionScript 2.0, which adds strong typing and explicit class declarations. ActionScript 1.0 and 2.0 share the same compiled form within Flash SWFs.

Features of the Flash ActionScript implementation that JavaScript programmers may find interesting:

  • Everything is designed to be asynchronous; callbacks are ubiquitous, but Event objects do not exist.
  • The XML implementation has been solid since Flash 5. Flash can send and receive XML asynchronously.