EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Division Assignment Operator

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Operators 157
Operands
expression : Number - A number or a variable that evaluates to a number.
Returns
Number - The floating-point result of the operation.
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 the value of expression1 / expression2. For example, the
following two statements are equivalent:
x /= y;
x = x / y;
Availability: ActionScript 1.0; Flash Player 4
Operands
expression1 : Number - A number or a variable that evaluates to a number.
expression2 : Number - A number or a variable that evaluates to a number.
Returns
Number - A number.
Example
The following code illustrates using the division assignment (
/=) operator with variables and
numbers:
var x:Number = 10;
var y:Number = 2;
x /= y; trace(x); // output: 5

Table of Contents

Related product manuals