Some images I've posted in the past, this one isn't boolean, but on a click moves the family of sprites off screen.
You could add a line to do the same to other sprite. Exact same line, as it's a toggle, swapping them back and forth. (this can be used to make a menu full of buttons appear and disappear in one event.)
Or here is a boolean toggle, when the sprite is touched, it flips between frame 0 and 1. (the 1 can be any frame)
When (sprite.animationframe=0) is true, it equals 1, so multiplying 1 by it equals 1, if it's false, it's 0, and multiplying 1 by it is 0.
Or using boolean in the 3rd and last two actions of this game of pong written in two events:
The third action down sets the opacity of the winner declaration, 0 if the score is less than 10, 100% if it's above.
the PaddleAI action sets the direction of the computer's paddle, depending on the Y position of the ball compared to the paddle.
And the last action sets the ball speed ever increasing, unless the score is 10 or over, in which case it sets the speed to 0.
QuickyPong Capx - or play it here.