Advanced Action not toggling Closed Captions
I've run into a problem trying to use Advanced Actions to turn on/off closed captions for a custom button I created. I'm using Advanced Actions because I am changing the state of the button (to a custom state). I did exactly the same thing with a "mute/sound on" button and it works perfectly.
Here's the script to be executed when someone clicks on the button:
If
cpCmndCC is equal to 0
Actions
Assign cpCmndCC equal to 1
Change state of ClosedCaption to CC_ON
Else
Assign cpCmndCC equal to 0
Change state of ClosedCaption to Normal
Half of the script works fine. The button starts in "Normal" state and when you click it, it changes to the "CC_ON" state and the captions are turned on.
But the other part doesn't work. Once the captions are on and the button is the "CC_ON" state, you can't turn them off, etc. So apparently the action isn't resetting the cpCmndCC value to 0.
Like I said, I did this exact same thing with mute/unmute, and it works perfectly. I can't figure out why it's not working unless there's a bug.
