MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 263

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Description
Operator (comparison); compares two expressions and determines whether
greater than or equal to
(
).
false
In Flash 5 or later, greater than or equal to (
various data types. In Flash 4,
later authoring environment undergo a conversion process to maintain data type integrity.
>> (bitwise right shift)
Availability
Flash Player 5.
Usage
expression1 >> expression2
Parameters
expression1
expression2
Returns
Nothing.
Description
Operator (bitwise); converts
the bits in
expression1
from the conversion of
the sign of the original
bit (the bit farthest to the left) of
bit is 1. Shifting a value right by one position is the equivalent of dividing by 2 and discarding
the remainder.
Example
The following example converts 65535 to a 32-bit integer, and shifts it 8 bits to the right.
x = 65535 >> 8
The result of the above operation is as follows:
x = 255
This is because 65535 decimal equals 1111111111111111 binary (sixteen 1's),
1111111111111111 binary shifted right by 8 bits is 11111111 binary, and 11111111 binary is
255 decimal. The most significant bit is 0 because the integers are 32-bit, so the fill bit is 0.
The following example converts -1 to a 32-bit integer and shifts it 1 bit to the right.
x = -1 >> 1
The result of the above operation is as follows:
x = -1
expression2
is an numeric operator. Flash 4 files brought into the Flash 5 or
>
A number or expression to be shifted right.
A number or expression that converts to an integer from 0 to 31.
expression1
to the right by the number of places specified by the integer resulting
. Bits that are shifted to the right are discarded. To preserve
expression2
, the bits on the left are filled in with 0 if the most significant
expression
expression1
(
), or whether
true
expression1
) is a comparison operator capable of handling
>
and
expression2
is 0, and filled in with 1 if the most significant
expression1
is less than
expression2
to 32-bit integers, and shifts all of
>> (bitwise right shift)
is
263

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents