When pressed change image and when pressed change image back

Hello
I was wondering guys if you know how to do the action what is in the title. "When pressed change image and when pressed change image back"
I was wondering guys if you know how to do the action what is in the title. "When pressed change image and when pressed change image back"
Comments
Next, in your pressed actor, create a rule: when touch is pressed > change attribute "game.imageswitch" to "(game.imageswitch+1)%2" (without the quotes). This will make it flip between 0 and 1 states each time its pressed.
Now in the actor that changes images, create a rule: when game.imageswitch = 1 change image (to whatever you want). In otherwise section of rule put change image (back to original image).
Hope that helps