String Greater Than

SWF Action
Action Category: 
Action Details: 
Action Identifier: 
Action Structure: 
Action Length: 
0 byte(s)
Action Stack: 
pop 2 (s), push 1 (b)
Action Operation: 
s1 := pop();
s2 := pop();
r := s2 > s1;
Action Flash Version: 

Similar to Swap + String Less Than although not exactly the same.

It checks whether the second string is greater than the first and return the Boolean result on the stack.1


The true meaning of this operator was to apply the String cast to both values, then compare the values as strings. This is not really good JavaScript as per ECMA, so later Macromedia added the strict comparison operators instead. This is why this action should never be used. Instead, one should use Greater Than (typed) and the Cast Object operator as required.

  • 1. I'm not too sure why Macromedia introduced this action in SWF version 6.