<= (less than or equal to)
SWiSH Player Support
SWF4 or later - Supported Internally
expression1 <= expression2
expression1, expression2 can be numbers or strings.
Operator (comparison): compares two expressions and determines whether expression1 is less than or equal to expression2; if so, the operator returns true. If expression1 is greater than expression2, the operator returns false.
String constants are converted to numeric unless both expressions are string constants.
Variables are assumed to be numeric. Possibly undergoing a conversion .
If string comparison is intended, use the le operator .
The definition of equal depends on the data type of the parameter:
If both of the two values are strings, they are compared as strings. Otherwise, any strings are converted to numbers before being compared.
If the values are numbers, then the values are compared
Note: For SWF4 only, comparing a variable and a string will assume the variable also contains a string, and will do a string comparison. For SWF5+ the actual type of value in the variable is used as above to determine how to compare.
The following examples illustrate true and false results for both numeric and string comparisons:
5 <= 10 ; // true
2 <= 2 ; // true
10 <= 3 ; // false
"Allen" <= "Jack"; // true
a = "a";
b = "b";
b <= a;
Possibly not what is exptected but caused by conversion of strings to numeric 0. Use the le operator instead.