Example
In the following example, the greater than (
of the text field
score_txt
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
operator.
Compares the string representation of
and returns
expression2
otherwise.
Availability: ActionScript 1.0; Flash Player 4
Operands
expression1 : Object
expression2 : Object
Returns
- The Boolean result of the comparison.
Boolean
See also
> greater than operator
>= greater than or equal to operator
expression1 >= expression2
Compares two expressions and determines whether
(
) or
expression2
true
162
ActionScript language elements
) operator is used to determine whether the value
>
is greater than 90:
expression1
if
true
expression1
- Numbers, strings, or variables.
- Numbers, strings, or variables.
is less than
expression1
with the string representation of
is greater than
expression2
is greater than or equal to
expression1
(
expression2
false
(greater than)
>
,
false
).
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?
Questions and answers