Syntax - MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Parameters
(also called arguments) are placeholders that let you pass values to functions.
For example, the following
and
firstName
function welcome(firstName:String, hobby:String):String {
var welcomeText:String = "Hello, " + firstName + ". I see you enjoy " + hobby
+".";
return welcomeText;
}
Packages
are directories that contain one or more class files and reside in a designated classpath
directory (see
"Understanding the classpath" on page
Properties
are attributes that define an object. For example,
specifies the number of elements in the array.
Statements
are language elements that perform or specify an action. For example, the
statement returns a result as a value of the function in which it executes. The
evaluates a condition to determine the next action that should be taken. The
creates a branching structure for ActionScript statements.
Target paths
are hierarchical addresses of movie clip instance names, variables, and objects in a
SWF file. You can use a target path to direct an action at a movie clip or to get or set the value of
a variable or property. For example, the following statement is the target path to the
property of the object named
stereoControl.volume
Variables
are identifiers that hold values of any data type. Variables can be created, changed, and
updated. The values they store can be retrieved for use in scripts. In the following example, the
identifiers on the left side of the equal signs are variables:
var x:Number = 5;
var name:String = "Lolo";
var c_color:Color = new Color(mcinstanceName);
For more information on variables, see

Syntax

As with all scripting languages, ActionScript has syntax rules that you must follow to create scripts
that can compile and run correctly. This section describes the elements that comprise
ActionScript syntax:
"Case sensitivity" on page 14
"Dot syntax" on page 14
"Curly braces" on page 15
"Semicolons" on page 15
"Parentheses" on page 16
"Comments" on page 16
welcome()
:
hobby
stereoControl
function uses two values it receives in the parameters
64).
length
:
"About variables" on page
is a property of all arrays that
return
statement
if
statement
switch
volume
27.
Syntax
13

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents