Flash Lite Operators

This section describes the syntax and use of Adobe's Macromedia Flash Lite 1.x ActionScript operators. All entries are listed alphabetically. However, some operators are symbols and are alphabetized by their text descriptions.

The operators in this section are summarized in the following table:

Operator

Description

add (string concatenation)

Concatenates (combines) two or more strings.

+= (addition assignment)

Assigns expression1 the value of expression1 + expression2.

and

Performs a logical AND operation.

= (assignment)

Assigns the value of expression2 (the operand on the right) to the variable or property in expression1.

/* (block comment)

Indicates one or more lines of script comments. Any characters that appear between the opening comment tag (/*) and the closing comment tag (*/) are interpreted as a comment and ignored by the ActionScript interpreter.

, (comma)

Evaluates expression1, then expression2, and returns the value of expression2.

// (comment)

Indicates the beginning of a script comment. Any characters that appear between the comment delimiter (//) and the end-of-line character are interpreted as a comment and ignored by the ActionScript interpreter.

?: (conditional)

Instructs Flash Lite to evaluate expression1, and if the value of expression1 is true, the operator returns the value of expression2; otherwise, it returns the value of expression3.

-- (decrement)

Subtracts 1 from expression. The pre-decrement form of the operator (--expression) subtracts 1 from expression and returns the result as a number.
The post-decrement form of the operator (expression--) subtracts 1 from expression and returns the initial value of expression (the value before the subtraction).

/ (divide)

Divides expression1 by expression2.

/= (division assignment)

Assigns expression1 the value of expression1 / expression2.

. (dot)

Used to navigate movie clip hierarchies to access nested (child) movie clips, variables, or properties.

++ (increment)

Adds 1 to expression. The expression can be a variable, element in an array, or property of an object. The pre-increment form of the operator (++expression) adds 1 to expression and returns the result as a number. The post-increment form of the operator (expression++) adds 1 to expression and returns the initial value of expression (the value before the addition).

&& (logical AND)

Evaluates expression1 (the expression on the left side of the operator) and returns false if the expression evaluates to false. If expression1 evaluates to true, expression2 (the expression on the right side of the operator) is evaluated. If expression2 evaluates to true, the final result is true; otherwise, it is false.

! (logical NOT)

Inverts the Boolean value of a variable or expression. If expression is a variable with the absolute or converted value of true, the value of !expression is false. If the expression x && y evaluates to false, the expression !(x && y) evaluates to true.

|| (logical OR)

Evaluates expression1 and expression2. The result is true if either or both expressions evaluate to true; the result is false only if both expressions evaluate to false. You can use the logical OR operator with any number of operands; if any operand evaluates to true, the result is true.

% (modulo)

Calculates the remainder of expression1 divided by expression2. If an expression operand is non-numeric, the modulo operator attempts to convert it to a number.

%= (modulo assignment)

Assigns expression1 the value of expression1 % expression2.

*= (multiplication assignment)

Assigns expression1 the value of expression1 * expression2 .

* (multiply)

Multiples two numeric expressions.

+ (numeric add)

Adds numeric expressions.

== (numeric equality)

Tests for equality; if expression1 is equal to expression2 , the result is true.

> (numeric greater than)

Compares two expressions and determines whether expression1 is greater than expression2 ; if it is, the operator returns true. If expression1 is less than or equal to expression2 , the operator returns false.

>= (numeric greater than or equal to)

Compares two expressions and determines whether expression1 is greater than or equal to expression2 (true) or whether expression1 is less than expression2 (false).

<> (numeric inequality)

Tests for inequality; if expression1 is equal to expression2 , the result is false.

< (numeric less than)

Compares two expressions and determines whether expression1 is less than expression2 ; if so, the operator returns true. If expression1 is greater than or equal to expression2, the operator returns false.

<= (numeric less than or equal to)

Compares two expressions and determines whether expression1 is less than or equal to expression2. If it is, the operator returns true; otherwise, it returns false.

() (parentheses)

Groups one or more parameters, performs sequential evaluation of expressions, or surrounds one or more parameters and passes them as parameters to a function outside the parentheses.

" " (string delimiter)

When used before and after a sequence of zero or more characters, quotation marks indicate that the characters have a literal value and are considered a string; they are not a variable, numeric value, or other ActionScript element.

eq (string equality)

Compares two expressions for equality and returns true if the string representation of expression1 is equal to the string representation of expression2; otherwise, the operation returns false.

gt (string greater than)

Compares the string representation of expression1 to the string representation of expression2 and returns true if expression1 is greater than expression2; otherwise, it returns false.

ge (string greater than or equal to)

Compares the string representation of expression1 to the string representation of expression2 and returns a true value if expression1 is greater than or equal to expression2; otherwise, it returns false.

ne (string inequality)

Compares the string representations of expression1 to expression2 and returns true if expression1 is not equal to expression2; otherwise, it returns false.

lt (string less than)

Compares the string representation of expression1 to the string representation of expression2 and returns a true value if expression1 is less than expression2; otherwise, it returns false.

le (string less than or equal to)

Compares the string representation of expression1 to the string representation of expression2 and returns a true value if expression1 is less than or equal to expression2; otherwise, it returns false.

- (subtract)

Used for negating or subtracting.

-= (subtraction assignment)

Assigns expression1 the value of expression1 - expression2.