I simply want to check whether the state has been changed, like this:
var currentState:states;
var lastState:states;
if(lastState != currentState){
print("state changed");
lastState = currentState;
}
But I get error, it seems this comparison is somehow wrong? but how to correct this comparison.
Regards,