03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - 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.

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

comment - Any characters.<br />

Example<br />

The following script uses comment delimiters at the beginning of the script:<br />

/* records the X <strong>and</strong> Y positions of<br />

the ball <strong>and</strong> bat movie clips */<br />

var ballX:Number = ball_mc._x;<br />

var ballY:Number = ball_mc._y;<br />

var batX:Number = bat_mc._x;<br />

var batY:Number = bat_mc._y;<br />

The following attempt to nest comments will result in an error message:<br />

/* this is an attempt to nest comments.<br />

/* But the first closing tag will be paired<br />

with the first opening tag */<br />

<strong>and</strong> this text will not be interpreted as a comment */<br />

See also<br />

// line comment delimiter operator<br />

, comma operator<br />

(expression1 , expression2 [, expressionN... ])<br />

Evaluates expression1, then expression2, <strong>and</strong> so on. This operator is primarily used with<br />

the for loop statement <strong>and</strong> is often used with the parentheses () operator.<br />

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

expression1 : Number - An expression to be evaluated.<br />

expression2 : Number - An expression to be evaluated.<br />

expressionN : Number - Any number of additional expressions to be evaluated.<br />

Returns<br />

Object - The value of expression1, expression2, <strong>and</strong> so on.<br />

Example<br />

The following example uses the comma (,) operator in a for loop:<br />

for (i = 0, j = 0; i < 3 && j < 3; i++, j+=2) {<br />

trace("i = " + i + ", j = " + j);<br />

}<br />

// Output:<br />

Operators 129

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

Saved successfully!

Ooh no, something went wrong!