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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Converts expression1 <strong>and</strong> expression2 to 32-bit integer values; you can call them V1 <strong>and</strong><br />

V2. Shifts all bits of the value of V1 to the left by V2 positions. Discards bits shifted off the<br />

left end of V1 by this operation, <strong>and</strong> inserts zeros in the bit positions on the right that are<br />

emptied. Shifting a value left by one position is the equivalent of multiplying it by 2.<br />

Floating-point numbers are converted to integers by discarding any digits after the decimal<br />

point. Positive integers are converted to an unsigned hexadecimal value with a maximum<br />

value of 4294967295 or 0xFFFFFFFF; values larger than the maximum have their most<br />

significant digits discarded when they are converted so the value is still 32-bit. Negative<br />

numbers are converted to an unsigned hexadecimal value via the two's complement notation,<br />

with the minimum being -2147483648 or 0x800000000; numbers less than the minimum<br />

are converted to two's complement with greater precision <strong>and</strong> also have the most significant<br />

digits discarded.<br />

The return value is interpreted as a two's complement number with sign, so the return value<br />

will be an integer in the range -2147483648 to 2147483647.<br />

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

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

expression1 : Number - A number or expression to be shifted left.<br />

expression2 : Number - A number or expression that converts to an integer from 0 to 31.<br />

Returns<br />

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

Example<br />

In the following example, the integer 1 is shifted 10 bits to the left: x = 1

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

Saved successfully!

Ooh no, something went wrong!