Hide picture until button is clicked

Nov 05, 2019

How can I hide a picture and make it appear after a button is clicked?

1 Reply
Ned Whiteley

Hi Kieva,

In the attached example i have included two slides. In the first one, pressing the button simply shows the picture once. In the second slide, the picture toggles between on and off when the button is pressed.

The technique is a simple one. You start by setting your initial state for your picture to Hidden and then use a trigger (activated by pressing the button) to change the state to Normal. The difference in the second example is that I have used a True / False variable to determine if the picture is currently visible or not. Each time the button is pressed, the variable toggles. If the variable is True (i.e. the picture is visible), it toggles to False when the button is pressed and then two other triggers either show or hide the picture depending on the new value of the variable. In this case the variable has changed to False and so the picture is now hidden.

The way I have associated True to visible and False to hidden is by initially setting the variable to False when the image is initially set to Hidden.

Hope this makes sense. If you have any queries, just get back to me here.

This discussion is closed. You can start a new discussion or contact Articulate Support.