Operators
149
Availability:
ActionScript 1.0; Flash Lite 1.0 - 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)
Operands
expression1 :
Object
- A string, integer, or floating-point number.
expression2 :
Object
- A string, integer, or floating-point number.
Returns
Boolean
- The Boolean result of the comparison.
Example
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");
}
ge greater than or equal to (strings) operator
expression1
ge
expression2
Deprecated
since Flash Player 5. This operator was deprecated in favor of the >= (greater than
or equal to) operator.
Compares the string representation of
expression1
with the string representation of
expression2
and returns
true
if
expression1
is greater than or equal to
expression2
,
false
otherwise.
Availability:
ActionScript 1.0; Flash Lite 1.0
Operands
expression1 :
Object
- Numbers, strings, or variables.
expression2 :
Object
- Numbers, strings, or variables.
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...