The following example is identical to the previous example except for the addition of the
parentheses () operator and illustrates once again that, when used with the parentheses ()
operator, the comma (,) operator returns the value of the last expression in the series:
var v:Number = 0;
var z:Number = 0;
v = (v + 4, z++, v + 6);
trace(v); // output: 6
trace(z); // output: 1
See also
() parentheses operator
add concatenation (strings) operator
string1 add string2
Deprecated since Flash Player 5. Macromedia recommends you use the addition (
when creating content for Flash Player 5 or later.
Note: Flash Lite 2.0 also deprecates the
Concatenates two or more strings. The add (+) operator replaces the Flash 4
Player 4 files that use the
for string concatenation when brought into the Flash 5 or later authoring environment. You
must use the add (+) operator to concatenate strings if you are creating content for Flash
Player 4 or earlier versions of the Flash Player.
Availability: ActionScript 1.0; Flash Lite 1.0
Operands
- A string.
string1 :
String
- A string.
string2 :
String
Returns
- The concatenated string.
String
See also
+ addition operator
140
ActionScript language elements
operator in favor of the addition (
add
operator are automatically converted to use the add (+) operator
&
) operator
+
) operator.
+
operator; Flash
&