It is worth noting the Scriptcase sample code for sc_actionbar_clicked_state currently has an error. It currently reads:
// Example using two button states
if (sc_actionbar_clicked_state == ‘state1’) {
sc_actionbar_state(‘BTN_name’, ‘state2’);
} else {
sc_actionbar_state(‘BTN_name’, ‘state1’);
}
It should be
if (sc_actionbar_clicked_state() == ‘state1’) {
otherwise the function isn’t called and it always fails.
I have reported as a bug…