162
ActionScript language elements
Example
In the following example, the greater than (
>
) operator is used to determine whether the value
of the text field
score_txt
is greater than 90:
if (score_txt.text>90) {
trace("Congratulations, you win!");
} else {
trace("sorry, try again");
}
gt greater than (strings) operator
expression1
gt
expression2
Deprecated
since Flash Player 5. This operator was deprecated in favor of the
>
(greater than)
operator.
Compares the string representation of
expression1
with the string representation of
expression2
and returns
true
if
expression1
is greater than
expression2
,
false
otherwise.
Availability:
ActionScript 1.0; Flash Player 4
Operands
expression1 : Object
- Numbers, strings, or variables.
expression2 : Object
- Numbers, strings, or variables.
Returns
Boolean
- The Boolean result of the comparison.
See also
> greater than operator
>= 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
).
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...