Division Assignment Operator - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Operands
expression :
Number
Returns
- The floating-point result of the operation.
Number
Example
The following statement divides the current width and height of the Stage, and then displays
the result in the Output panel.
trace(Stage.width/2);
trace(Stage.height/2);
For a default Stage width and height of 550 x 400, the output is 275 and 150.
See also
% modulo operator

/= division assignment operator

expression1 /= expression2
Assigns
expression1
following two statements are equivalent:
x /= y; and x = x / y;
Availability: ActionScript 1.0; Flash Lite 1.0
Operands
expression1 :
Number
expression2 :
Number
Returns
- A number.
Number
Example
The following code illustrates using the division assignment (
numbers:
var x:Number = 10;
var y:Number = 2;
x /= y; trace(x); // output: 5
- A number or a variable that evaluates to a number.
the value of
expression1 / expression2
- A number or a variable that evaluates to a number.
- A number or a variable that evaluates to a number.
. For example, the
operator with variables and
/=)
Operators
143

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASHLITE2 ACTIONSCRIPT-LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash lite 2

Table of Contents