238
Chapter 12: ActionScript Dictionary
Example
Usage 1: The following example assigns the value 50 to the variable
x
.
x = 5;
y = 10;
trace (x *= y);
// returns 50
Usage 2: The second and third lines of the following example calculate the expressions on the
right-hand side of the equals sign and assign the results to
x
and
y
.
i = 5;
x = 4 - 6;
y = i + 2;
trace(x *= y);
// returns -14
See also
* (multiplication)
, (comma)
Availability
Flash Player 4.
Usage
expression1
,
expression2
Parameters
None.
Returns
Nothing.
Description
Operator; evaluates
expression1
, then
expression2
, and returns the value of
expression2
.
This operator is primarily used with the
for
loop statement.
Example
The following code sample uses the comma operator:
var a=1, b=2, c=3;
This is equivalent to writing the following code:
var a=1;
var b=2;
var c=3;
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...