Show or Hide a picture with marker

Hello everyone, 

I want to show then hide a picture when the users clicks on a marker. 

First time the user clicks, the text of the marker opens and the picture is shown. 

Second time the user clicks, the text of the marker closes and the picture is hidden. 

But it doesn't work. 

Could you please help me ? 

Here enclosed my file .story. 

Am

4 Replies
Mike Taylor

One way you could do that is to use a variable that toggles between True/False and change the state of that object based on that. I've attached an example. I replaced the original trigger with one that toggles the variable between true and false using the "= NOT assignment" option & then added triggers to change the object state based on the value of that variable. Does that do what you were wanting it to do?