ActionScript 3.0 is the internal programming language for Flash, Flex, and AIR (the Adobe Integrated Runtime application).
With AS3 (ActionScript 3.0) you can write instructions to control the elements in a Flash presentation. For example, you can add instructions for buttons to play and stop an animation, or to change the color and size of an object. Also, ActionScript can be used to add objects (shapes, lines, text) in a Flash presentation without creating them on the Stage.
ActionScript is the programming language used to create Flash games which can be included in Web pages.
ActionScript 3.0 was introduced by Adobe in 2006 with "Adobe Flex 2.0".
It is a scripting language similar to JavaScript, for example, both languages uses the keyword "var" to declare the variables, the strings are joined with the "+" character. If you know JvaScript, you'll understand and learn faster AS3.
ActionScript 3.0 requires an object-oriented approach, includes some of the new concepts of object-oriented programming (OOP): classes, objects, methods, and events.

To create a Flash presentation which uses ActionScript 3, open a new document choosing "ActionScript 3.0" from the "Create New" column in the Flash start window (or from File -> New).
You can place the ActionScript code in frames in the Flash Timeline, or you can place your code in a completely separate ActionScript (.as) file.

For a start it will be shown how to add the code directly into the document, in Frames in the Timeline.
After you have opened a new document, create a new Layer in the Timeline (from Insert -> Timeline -> Layer) and call it actions or scripts (you can change the name of the Layer by double-clicking on its name).

It's better to keep your ActionScript code in a single layer at the top of the timeline that holds only AS3 code. Also, you can use any name for this layer, but it's better to have a suggestive name.

The ActionScript code will be write in a special panel (an Actions panel, shown in the picture below).
To open the Actions panel, cick a keyframe where you want to add your code, then click Window -> Acions (or press F9).

Actions panel

Actions panel
- The Actions pannel is used to add code and AS3 instructions in the Flash document.
- At the bottom of the picture is the Timeline panel, with the layer "Actions" created for adding ActionScript codes to its Frames. The code here is added in the first keyframe.
AS3 is case-sensitive, so: "you", "You" and "YOU" are three different things.

Daily Test with Code Example

Which attribute is used in <img> tag for the address of the image?
href src rel
<img src="" width="191" height="63" alt="Courses-Web" />
Which CSS code hides the element on page?
display: none; display: inline; position: relative;
#id {
  display: none;
What instruction stops the execution of a while() or for() statement?
continue prompt() break
for(var i = 0; i< 8; i++) {
  if(i > 1) break;
Indicate the function that can create a constant.
define() include() defined()
define("CONSTANT_NAME", "value");
Introduction to ActionScript 3

Last accessed pages

  1. sPBM - Simple PHP Backup Manager (719)
  2. PHP PDO - Select query, fetch (14291)
  3. Creating Mask Layers in Flash (3019)
  4. DirectoryIterator to get file and directory info (1489)
  5. Mystic India Pop (4345)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (49620)
  2. Read Excel file data in PHP - PhpExcelReader (38033)
  3. PHP-MySQL free course, online tutorials PHP MySQL code (36948)
  4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (33324)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (30696)