Made to Order Software Corporation Logo

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.


Post new comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.