Show
Getting started with ActionScriptThe 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 the following Help titles: You do not have 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 can find ActionScript immediately familiar. For more information about ECMAScript, go to ecma-international.org. Which version of ActionScript can you use? Animate includes more than one version of ActionScript to meet the needs of different kinds of developers and playback hardware. ActionScript 3.0 and 2.0 are not compatible with each other.
Using the ActionScript documentation Due to multiple versions of ActionScript (2.0 and 3.0), and multiple ways of incorporating it into your FLA files, there are different ways to learn ActionScript. You can find description about 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 guides you to learn about the individual versions of ActionScript. Ways of working with ActionScript There are several ways to work with ActionScript.
When you write ActionScript code in the authoring environment, you use the Actions panel or Script window. The Actions panel and Script window contain a full-featured code editor that includes code hinting and coloring, code formatting, and syntax highlighting features. It also contains debugging, line numbers, word wrapping, and support for Unicode.
More recommended community content The following articles and tutorials provide more detailed information about working with ActionScript: Overview of the Output panelWhen you execute any doc type, the Output panel displays information or warning related to operations such as document conversions and publish. To display this information, add trace() statements to your code or use the List Objects and List Variables commands. If you use the trace() statement in your scripts, you can send specific information to the Output panel when the SWF file runs. It includes notes about the status of the SWF file status or the value of an expression. The Output panel consists of the following menu items:
To display or hide the output panel, select Window > Output or press F2. Actions panelLooking for the Language Reference?To find reference documentation for a specific ActionScript language element, do one of the following:
Learning ActionScriptTo learn about writing ActionScript, use these resources: ActionScript 3.0 and 2.0 are not compatible with each other. Choose only one version for each FLA file you create.Overview of the Actions panelTo create scripts embedded in a FLA file, enter ActionScript directly into the Actions panel (Window > Actions or press F9). The Actions panel consists of two panes: Script pane Lets you type ActionScript code, which is associated with the currently selected frame. Script navigator Lists the scripts in your Animate document, and lets you move quickly between them. To view the script in the Script pane, click an item in the Script navigator. The Actions panel lets you access the code-assistance features that simplify and streamline coding in ActionScript. You can add non-frame specific global and third-party scripts that can be applied to the whole animation from within Animate. For more information, see Adding Global and Third-party scripts section in this page.
Using actions code wizardYou can add interactivity to HTML5 compositions with the Add using wizard options in Actions panel. Add using wizard is a simplified user interface to add code to your compositions.
You can choose the Current Selectionoption from the menu when you select an object in the stage and run the actions code wizard. You can also choose the timeline and components actions for the code. Enhance the interactivity of an AnimationInteractivity is an essential part of an animation that boosts the visual experience of the audience. Want to learn how to introduce actions to the video without any codes? Watch the tutorial at the end of this example and follow these steps.
How to add interactivity to your animations
Watch the video to learn about more actions like play, move vertically, and position the object. Using script windowThe Script window lets you create external script files that you import into your application. These scripts can be ActionScript or Animate JavaScript files. You can also add Global and Third-party scripts in HTML5 canvas documents. For more information, see Adding Global and Third-party scripts section in Create and publish HTML5 Canvas documents in Animate If you have more than one external file open, filenames are displayed on tabs across the top of the Script window. In the Script window, you can use PinScript, find and replace, syntax coloring, format code, code hinting and commenting, and code collapse features. You can also use debug options (ActionScript files only), and word wrap. The Script window also lets you display line numbers and hidden characters. Create an external file in the Script window
Edit an existing file in the Script window
The Actions panel let you access the code-assistance features that simplify and streamline coding in ActionScript. Find Finds and replaces text in your script. Insert Target Path (Actions panel only) Helps you set an absolute or relative target path for an action in the script. Help Displays reference information for the ActionScript element that is selected in the Script pane. For example, if you click an import statement and then click Help, the reference information for import appears in the Help panel. Code Snippets Opens the Code Snippets panel that displays sample code snippets. Add using wizard Helps you to add code for actions using an interface without having to write code. Accessing context-sensitive Help from the Actions panel
Set ActionScript preferencesWhether you edit code in the Actions panel or the Script window, you can set and modify a single set of preferences.
|