Search Tutorials:

Wednesday, December 10, 2008

Adobe Flash CS3 - ActionScript 3.0 - Beyond The Basics

Adobe Flash CS3 - ActionScript 3.0 - Beyond The Basics


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.
Using the ActionScript documentation

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:

1. Getting started with ActionScript 3.0: www.adobe.com/go/vid0129
2. Creating interactivity with ActionScript 3.0: www.adobe.com/go/vid0130
3. Flash workflow: www.adobe.com/go/vid0132
4. 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:

1. Create an Application
2. Add Interactivity
3. Work with Objects and Classes

ActionScript versions
Flash includes more than one version of ActionScript to meet the needs of different kinds of developers and playback hardware.

1. 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.

2. 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.

3. 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.

4. 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.

5. 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.

Ways of working with ActionScript
There are several ways to work with ActionScript.

1. 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.

2. 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.

3. 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.

4. 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.

Writing 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, syntax highlighting, syntax checking, debugging, line numbers, word wrapping, and support for Unicode.

1. Use the Actions panel to write scripts that are part of your Flash document (that is, scripts that are embedded in the FLA file). The Actions panel provides features such as the Actions toolbox, which gives you quick access to the core ActionScript language elements, and Script Assist mode, in which you are prompted for the elements needed to create scripts.

2. Use the Script window if you want to write external scripts—that is, scripts or classes that are stored in external files. (You can also use a text editor to create an external AS file.) The Script window includes code-assistance features such as code hinting and coloring, syntax checking, and auto-formatting.

Source: http://livedocs.adobe.com/flash/9.0/UsingFlash/

Social Bookmarking

No comments:

Blog Disclaimer

One Stop Web Dev't Buckets is a personal blog that aims to share online video tutorials. This blog is a collaborative effort of individuals who are currently registered members of other online community sites. One Stop Web Dev't Buckets does not claim any form of ownership or copyright in the materials found in this blog. Most of the video tutorials and contents featured in this blog come from other sites. The said materials are owned by those sites where these resources are posted.

Blog Affiliates

Web Development & Design - Top Blogs Philippines