Question:
How can I change the visibility of a screen object with a button?
Solution:
There are two ways to do so:
- On the button’s Tags tab, link it to the object’s Visible property; or
- Change the value of the object’s Visible property by script.
Button’s script examples:
On OnLButtonDown event (by clicking the button):
//Hides the Text object
Text.visible = 0
And on the OnRelease event (when the button is released):
//Displays the Text object
Text.visible = 1