You probably hyavre your events set up the wrong way. Maybe the else event is triggered at the wrong moment, or you don't pick the right instance in that event.
This is just personal preference, but when I want to toggle I always use a variable.
In your case you could use an instance variable, let's call it FrameToggle.
On Sprite touched - Sprite set variable FrameToggle: 1-FrameToggle
-- System compare two values - Sprite.FrameToggle = 1 - Sprite set frame to : 1
-- System compare two values - Sprite.FrameToggle = 0 - Sprite set frame to : 0
where -- is a subevent.