On clicked
If frame0 > Wait 0.1s > Set frame1
If frame1 > Wait 0.1s > Set frame0
Something like that you mean?
If you're just using a single object you can use 'Compare Frame' > 'Set Frame'
The wait is so that the variables don't try to change each other at the same time and you get stuck in a loop.