![MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference Download Page 94](http://html1.mh-extra.com/html/macromedia/flex-flex-actionscript-language/flex-flex-actionscript-language_reference_3387192094.webp)
94
Chapter 5: ActionScript Core Language Elements
Example
Usage 1: The following statement reverses the sign of the expression 2 + 3:
trace(-(2+3));// output: -5
Usage 2: The following statement subtracts the integer 2 from the integer 5:
trace(5-2);// output: 3
The result, 3, is an integer.
Usage 3: The following statement subtracts the floating-point number 1.5 from the floating-point
number 3.25:
trace(3.25-1.5);// output: 1.75
The result, 1.75, is a floating-point number.
* (multiplication)
Availability
Flash Player 4.
Usage
expression1
*
expression2
Parameters
None.
Returns
An integer or floating-point number.
Description
Operator (arithmetic); multiplies two numerical expressions. If both expressions are integers, the
product is an integer. If either or both expressions are floating-point numbers, the product is a
floating-point number.
For more information, see
“Operator precedence and associativity” on page 32
.
Example
Usage 1: The following statement multiplies the integers 2 and 3:
trace(2*3); // output: 6
The result, 6, is an integer.
Usage 2: This statement multiplies the floating-point numbers 2.0 and 3.1416:
trace(2.0 * 3.1416); // output: 6.2832
The result, 6.2832, is a floating-point number.
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...