03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4 - In Flash 4 files, the % operator is exp<strong>and</strong>ed in<br />

the SWF file as x - int(x/y) * y <strong>and</strong> may not be as fast or as accurate in later versions of<br />

Flash Player.<br />

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

expression1 : Number - A number or expression that evaluates to a number.<br />

expression2 : Number - A number or expression that evaluates to a number.<br />

Returns<br />

Number - The result of the arithmetic operation.<br />

Example<br />

The following example assigns the value 4 to the variable x:<br />

var x:Number = 14;<br />

var y:Number = 5;<br />

trace(x = y); // output: 4<br />

See also<br />

% modulo operator<br />

* multiplication operator<br />

expression1 * expression2<br />

Multiplies two numerical expressions. If both expressions are integers, the product is an<br />

integer. If either or both expressions are floating-point numbers, the product is a floatingpoint<br />

number.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4<br />

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

expression1 : Number - A number or expression that evaluates to a number.<br />

expression2 : Number - A number or expression that evaluates to a number.<br />

Returns<br />

Number - An integer or floating-point number.<br />

Operators 183

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

Saved successfully!

Ooh no, something went wrong!