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 tag adds a new line into a paragraph?
<b> <br> <p>
First line ...<br>
Other line...
Which CSS property can be used to add space between letters?
text-size word-spacing letter-spacing
#id {
  letter-spacing: 2px;
What JavaScript function can be used to get access to HTML element with a specified ID?
getElementById() getElementsByTagName() createElement()
var elm = document.getElementById("theID");
var content = elm.innerHTML;
Click on the "echo" correct instruction.
echo "" echo ""; echo """;
echo "Address URL:";
Introduction to ActionScript 3

Last accessed pages

  1. Insert, Select and Update NULL value in MySQL (26535)
  2. jQuery Drag and Drop Rows between two similar Tables (6882)
  3. Ajax-PHP Chat Script (36546)
  4. JavaScript code and PHP (20369)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (41565)

Popular pages this month

  1. Read Excel file data in PHP - PhpExcelReader (487)
  2. PhpSpreadsheet - Read, Write Excel and LibreOffice Calc files (388)
  3. Register and show online users and visitors (365)
  4. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (346)
  5. Insert, Select and Update NULL value in MySQL (237)