Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript language elements > Operators > >= greater than or equal to operator | |||
expression1 >= expression2
Compares two expressions and determines whether expression1 is greater than or equal to expression2 (true) or expression1 is less than expression2 (false).
Availability: ActionScript 1.0; Flash Player 4 - In Flash 4, >= is a numeric operator. In Flash 5 or later, the greater than or equal to (>=) operator is a comparison operator capable of handling various data types. Flash 4 files that are brought into the Flash 5 or later authoring environment undergo a conversion process to maintain data type integrity. The following illustrates the conversion of a Flash 4 file containing a numeric quality comparison. Flash 4 file: x >= y Converted Flash 5 or later file: Number(x) >= Number(y)
expression1 : Object - A string, integer, or floating-point number.
expression2 : Object - A string, integer, or floating-point number.
Boolean - The Boolean result of the comparison.
In the following example, the greater than or equal to (>=) operator is used to determine whether the current hour is greater than or equal to 12:
if (new Date().getHours() >= 12) {
trace("good afternoon");
} else {
trace("good morning");
}
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001277.html