Create a global variable that tracks the on/off.
Create an event that changes the variable whenever the button is hit. So for example:
On touch myButton
If myVariable = 0
Set myVariable = 1
else
Set myVariable = 0
Then for the state of the button, set the frame to match your variable.
myButton animationFrame = myVariable