03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

var v:Number = 0;<br />

var z:Number = 0;<br />

v = v + 4 , z++, v + 6;<br />

trace(v); // output: 4<br />

trace(z); // output: 1<br />

The following example is identical to the previous example except for the addition of the<br />

parentheses () operator, which changes the order of operations such that the comma operator<br />

is evaluated before the assignment (=) operator:<br />

var v:Number = 0;<br />

var z:Number = 0;<br />

v = (v + 4, z++, v + 6);<br />

trace(v); // output: 6<br />

trace(z); // output: 1<br />

See also<br />

() parentheses operator<br />

add concatenation (strings) operator<br />

string1 add string2<br />

Deprecated since Flash Player 5. <strong>Adobe</strong> recommends that you use the add (+) operator when<br />

creating content for Flash Player 5 or later. This operator is not supported in Flash Player 8 or<br />

later.<br />

Concatenates two or more strings. The add (+) operator replaces the Flash 4 & operator; Flash<br />

Player 4 files that use the & operator are automatically converted to use the add (+) operator<br />

for string concatenation when brought into the Flash 5 or later authoring environment. Use<br />

the add (+) operator to concatenate strings if you are creating content for Flash Player 4 or<br />

earlier versions of the Player.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4<br />

Oper<strong>and</strong>s<br />

string1 : String - A string.<br />

string2 : String - A string.<br />

Returns<br />

String - The concatenated string.<br />

See also<br />

+ addition operator<br />

158 <strong>ActionScript</strong> language elements

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!