The ActionScript scripting language lets you add complex interactivity, playback control, and data display to your application. You can add ActionScript in the authoring environment by using the Actions panel, Script window, or an external editor.
ActionScript follows its own rules of syntax, reserved keywords, and lets you use variables to store and retrieve information. ActionScript includes a large library of built‑in classes that let you create objects to perform many useful tasks. For more information on ActionScript, see Programming ActionScript 3.0, Learning ActionScript 2.0 in Adobe Flash, or the ActionScript Language References.
You don’t need to understand every ActionScript element to begin scripting; if you have a clear goal, you can start building scripts with simple actions.
ActionScript and JavaScript are both rooted in the ECMA-262 standard, the international standard for the ECMAScript scripting language. For this reason, developers who are familiar with JavaScript should find ActionScript immediately familiar. For more information about ECMAScript, go to ecma-international.org.
Because there are multiple versions of ActionScript (2.0 and 3.0), and multiple ways of incorporating it into your FLA files, there are several different ways to learn ActionScript.
This help system describes the graphical user interface for working with ActionScript. This interface includes the Actions panel, Script window, Script Assist mode, Behaviors panel, Output panel, and Compiler Errors panel. These topics apply to all versions of ActionScript.
Other ActionScript documentation from Adobe will help you learn about the individual versions of ActionScript; see Programming ActionScript 3.0, Learning ActionScript 2.0 in Adobe Flash, Developing Flash Lite 1.x Applications or Developing Flash Lite 2.x Applications. For information about the ActionScript vocabulary, see the ActionScript Language Reference for the version you are working with.
For video tutorials about ActionScript 3.0, the Flash workflow, and components, see the following:
Getting started with ActionScript 3.0: www.adobe.com/go/vid0129
Creating interactivity with ActionScript 3.0: www.adobe.com/go/vid0130
Flash workflow: www.adobe.com/go/vid0132
Using components: www.adobe.com/go/vid0133
For text tutorials about ActionScript, see www.adobe.com/go/learn_fl_tutorials. The following tutorials are available:
Create an Application
Add Interactivity
Work with Objects and Classes
Flash includes more than one version of ActionScript to meet the needs of different kinds of developers and playback hardware.
ActionScript 3.0 executes extremely fast. This version requires somewhat more familiarity with object-oriented programming concepts than the other ActionScript versions. ActionScript 3.0 is fully compliant with the ECMAScript specification, offers better XML processing, an improved event model, and an improved architecture for working with onscreen elements. FLA files that use ActionScript 3.0 cannot include earlier versions of ActionScript.
ActionScript 2.0 is simpler to learn than ActionScript 3.0. Although Flash Player runs compiled ActionScript 2.0 code slower than compiled ActionScript 3.0 code, ActionScript 2.0 is still useful for many kinds of projects that are not computationally intensive; for example, more design-oriented content. ActionScript 2.0 is also based on the ECMAScript spec, but is not fully compliant.
ActionScript 1.0 is the simplest form of ActionScript, and is still used by some versions of the Flash Lite Player. ActionScript 1.0 and 2.0 can coexist in the same FLA file.
Flash Lite 2.x ActionScript is a subset of ActionScript 2.0 that is supported by Flash Lite 2.x running on mobile phones and devices.
Flash Lite 1.x ActionScript is a subset of ActionScript 1.0 that is supported by Flash Lite 1.x running on mobile phones and devices.
Script Assist mode lets you add ActionScript to your FLA file without writing the code yourself. You select actions, and the software presents you with a user-interface for entering the parameters required for each one. You must know a little about what functions to use to accomplish specific tasks, but you don’t have to learn syntax. Many designers and non-programmers use this mode.
Behaviors also let you add code to your file without writing it yourself. Behaviors are prewritten scripts for common tasks. You can add a behavior and then easily configure it in the Behaviors panel. Behaviors are available only for ActionScript 2.0 and earlier.
Writing your own ActionScript gives you the greatest flexibility and control over your document, but it requires you to become familiar with the ActionScript language and conventions.
Components are prebuilt movie clips that help you implement complex functionality. A component can be a simple user interface control, such as a check box, or it can be a complicated control, such as a scroll pane. You can customize a component’s functionality and appearance, and you can download components created by other developers. Most components require you to write some ActionScript code of your own to trigger or control a component. For more information, see About ActionScript 3.0 Components in Using ActionScript 3.0 Components or About Components in Using ActionScript 2.0 Components.