# Show / hide button

**URL:** <https://forum.kirupa.com/t/show-hide-button/113960>\
**Category:** Uncategorized\
**Created:** [June 23, 2004, 11:23am UTC](https://forum.kirupa.com/t/show-hide-button/113960 "2004-06-23T11:23:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clwright\_2000](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@clwright\_2000](https://forum.kirupa.com/u/clwright_2000)\
**Post date:** [June 23, 2004, 11:23am UTC](https://forum.kirupa.com/t/show-hide-button/113960/1 "2004-06-23T11:23:14Z")

</div>

Hi all,

Can anyone tell me why the following code doesnt work? Ive created a button with the below code in. When the button is clicked I want mts (mountains) to appear on screen, and when the button is clicked again I want them to be hidden.

Ive used “\_root.mts.\_visible = false;” in the first frame to initially set it to hide.

on (release) {

if (\_root.mts.\_visible = true) {   
\_root.mts.\_visible = false;   
}else {   
\_root.mts.\_visible = true;

```
}

```

}

thanks,

Claire
