ActionScript
ActionScript is an object-oriented programming language originally developed by Macromedia Inc.. It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript, though it originally arose as a sibling, both being influenced by HyperTalk. ActionScript code is usually converted to bytecode format by a compiler.
ActionScript is used primarily for the development of websites and software targeting the Adobe Flash platform, originally finding use on web pages in the form of embedded SWF files.
ActionScript 3 is also used with the Adobe AIR system for the development of desktop and mobile applications. The language itself is open-source in that its specification is offered free of charge and both an open-source compiler and open-source virtual machine are available.
ActionScript was also used with Scaleform GFx for the development of three-dimensional video-game user interfaces and heads up displays.
Overview
ActionScript was initially designed for controlling simple two-dimensional vector animations made in Adobe Flash. Initially focused on animation, early versions of Flash content offered few interactivity features, thus had very limited scripting ability. Later versions added functionality allowing for the creation of web-based games and rich web applications with streaming media. Today, ActionScript is suitable for desktop and mobile development through Adobe AIR; it is used in some database applications and in basic robotics as in Make Controller Kit.Flash MX 2004 introduced ActionScript 2.0, a scripting language more suited to the development of Flash applications. Saving time is often possible by scripting something rather than animating it, which usually also enables a higher level of flexibility when editing.
Since the arrival of the Flash Player 9 alpha, a newer version of ActionScript has been released, ActionScript 3.0. This version of the language is intended to be compiled and run on a version of the Tamarin virtual machine, formerly ActionScript Virtual Machine 2, that was also fully rewritten. Because of this, code written in ActionScript 3.0 is generally targeted for Flash Player 9 and higher, and will not work in prior versions. At the same time, ActionScript 3.0 executes up to 10 times faster than legacy ActionScript code due to the just-in-time compiler enhancements.
Flash libraries can be used with the XML abilities of the browser to render rich content in the browser. This technology is known as Asynchronous Flash and XML, much like AJAX. Adobe offers its Flex product line to meet the demand for rich web applications built on the Flash runtime, with behaviors and programming done in ActionScript. ActionScript 3.0 forms the foundation of the Flex 2 application programming interface.
History
ActionScript started as an object-oriented programming language for Macromedia's Flash authoring tool, later developed by Adobe Systems as Adobe Flash. The first three versions of the Flash authoring tool provided limited interactivity features. Early Flash developers could attach a simple command, called an "action", to a button or a frame. The set of actions was basic navigation controls, with commands such as "play", "stop", "getURL", and "gotoAndPlay".With the release of Flash 4 in 1999, this simple set of actions became a small scripting language. New capabilities introduced for Flash 4 included variables, expressions, operators, if statements, and loops. Although referred to internally as "ActionScript", the Flash 4 user manual and marketing documents continued to use the term "actions" to describe this set of commands.
Timeline by player version
- Flash Player 2: The first version with scripting support, its actions included gotoAndPlay, gotoAndStop, nextFrame and nextScene for timeline control.
- Flash Player 3: Expanded basic scripting support, it has the ability to load external SWFs.
- Flash Player 4: The first player with a full scripting implementation, the scripting was a Flash-based syntax and contained support for loops, conditionals, variables, and other basic language constructs.
- Flash Player 5: Included in the first version of ActionScript, it used prototype-based programming based on ECMAScript, and allowed full procedural programming and object-oriented programming. Design based development.
- Flash Player 6 added an event-handling model, accessibility controls, and support for switch. The first version with support for the Action Message Format and Real-Time Messaging Protocol allowed for on demand audio/video streaming.
- Flash Player 7: Additions to it include Cascading Style Sheets styling for text and support for ActionScript 2.0, a programming language based on the ECMAScript 4 Netscape Proposal with class-based inheritance. However, ActionScript 2.0 can cross compile to ActionScript 1.0 bytecode, so that it can run in Flash Player 6.
- Flash Player 8 further extended ActionScript 1/ActionScript 2 by adding new class libraries with APIs for controlling bitmap data at run-time, file uploads, and live filters for blur and drop shadow.
- Flash Player 9 added ActionScript 3.0 with the advent of a new virtual machine, called ActionScript Virtual Machine 2, which coexists with the previous AVM1 needed to support legacy content. Performance increases were a major objective for this release of the player, including a new just-in-time compiler. Support for binary sockets, ECMAScript for XML XML parsing, full-screen mode, and regular expressions were added. This is the first release of the player to be titled Adobe Flash Player.
- Flash Player 10 : Added basic 3D manipulation, such as rotating on the X, Y, and Z axis, a 3D drawing API, and texture mapping. Ability to create custom filters using Adobe Pixel Bender. Several visual processing tasks are now offloaded to the GPU which gives a noticeable decrease to rendering time for each frame, resulting in higher frame rates, especially with H.264 video. There is a new sound API which allows for custom creation of audio in flash, something that has never been possible before. Furthermore, Flash Player 10 supports Peer to Peer communication with Real Time Media Flow Protocol.
- Flash Player 11: The major addition in this version are the Stage3D-based advanced 3D capabilities for Windows Desktop, Mac Desktop, iOS, Android, and other major platforms. Significant compatibility improvements have been added for the iOS platform, and other non-desktop platforms. Other features include H.264 encoding for cameras, Native JSON support, Cubic Bézier Curves, a secure random number generator, LZMA compression for SWF files, workers to offload some code execution to other processor threads, graphics card accelerated camera feed rendering, memory intrinsics and performance analysis, and the ActionScript Compiler 2.0, as well as some other minor additions.
- Flash Player 11.2: released in March 2012, focused on adding features that are key for the gaming and video markets. Some of the features in the release include the following: Mouse-lock support. Right and middle mouse-click support. Context menu disabling. Hardware-accelerated graphics/Stage 3D support for Apple iOS and Android via Adobe AIR. Support for more hardware accelerated video cards in order to expand availability of hardware-accelerated content. New Throttle event API. Multithreaded video decoding pipeline on PCs, which improves overall performance of video on all desktop platforms. Notification of use of premium features in the debug players; content runs unrestricted in the release players.
- Flash Player 11.3: released in June 2012, focused on enabling features and functionality key for the gaming market, as well as addressing popular feature requests from developers. Some of the features in this release include the following: Keyboard input support in full-screen mode. Improved audio support for working with low-latency audio. Ability to progressively stream textures for Stage 3D content. Protected mode for Flash Player in Firefox. Frame label events. Support for compressing BitmapData to JPEG and PNG formats. Support for Mac OS X App Store application sandboxing requirements. Text streaming support for Stage 3D. Expanded information about GPU driver details. Bitmap draw with quality API. Release outside mouse event API. Flash Player silent update support for Mac OS. Stylus support for Android 4.0 devices. USB debugging for iOS. iOS simulator support.
- Flash Player 11.4: Released in August 2012, it focused on enabling features and functionality that are key for the gaming market, as well as addressing popular feature requests from developers. Some of the features in this release include ActionScript workers, support for advanced profiling, LZMA compression support for ByteArray, support for hardware-accelerated video cards for Stage 3D expanded to 2006, improved ActionScript performance when targeting Apple iOS, performance index API to inform about performance capabilities of current environment, support for compressed textures with alpha support, support for StageVideo.attachCamera API, and support for push notifications for iOS.
- Flash Player 11.5: Released in November 2012, it focused on performance improvement and stability. Some of the features in this release include shared ByteArray support for ActionScript workers, debug stack trace in release builds of Flash Player, and various bug fixes.
- Flash Player 11.6: Released in March 2013, it focuses on performance improvements, security enhancements, and stability. Some of the features in this release include ability to query graphics vector data at runtime, full-screen permission dialog user interface improvements, ability to load SWFs at runtime when deploying as an AIR application in AOT mode on iOS, finer-grained control over supported display resolution on iOS devices when deploying as an AIR application, HiDPI support for Flash Professional, and ActionScript 3 access to fast memory operations/intrinsics.
- Flash Player 11.7: Released in June 2013, code-named "Geary", this release focuses on premium video, gaming, security, and stability. Some of the features planned for this release include Android captive runtime debugging, support for the OUYA controller, remote hosting of SWF files on iOS, and preventing backup of shared objects on iOS for better iCloud support.
- Flash Player 11.8: Adobe was planning to release this version in the early part of the second half of 2013, code-named "Harrison". This release focused on premium video, gaming, security, and stability. Some of the features in this release would have included recursive stop API on MovieClips and GamePad support on desktop browsers and Android.