Actionscript Course

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

HTML
CSS
JavaScript
PHP-MySQL
Which HTML5 tag is indicated to be used as container for menu with navigation links in Web site?
<section> <nav> <article>
<nav><ul>
 <li><a href="http://coursesweb.net/css/" title="CSS Course">CSS Course</a></li>
 <li><a href="http://www.marplo.net/jocuri/" title="Flash Games">Flash Games</a></li>
</ul></nav>
Which CSS property shifts an item horizontally to the left or right of where it was?
text-align clear float
.some_class {
  width: 30%;
  float: left;
}
Click on the Math object method which returns x, rounded downwards to the nearest integer.
Math.ceil(x) Math.abs(x) Math.floor(x)
var num = 12.34567;
num = Math.floor(num);
alert(num);       // 12
Indicate the PHP function which returns the number of characters in string.
mb_strlen() count() stristr()
$str = "string with utf-8 chars åèö";
$nrchr = mb_strlen($str);
echo $nrchr;        // 30
Introduction to ActionScript 3

Last accessed pages

  1. Splat Operator in PHP (4392)
  2. Countdown Timer until specified Date-Time (4796)
  3. Prayer The Art of Believing (1611)
  4. PHP Method Chaining (5345)
  5. PHP Unzipper - Extract Zip, Rar Archives (31727)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (206)
  2. Read Excel file data in PHP - PhpExcelReader (73)
  3. The Four Agreements (68)
  4. PHP Unzipper - Extract Zip, Rar Archives (66)
  5. Get and Modify content of an Iframe (51)
Chat
Chat or leave a message for the other users
Full screenInchide