# Button?

**URL:** <https://forum.kirupa.com/t/button/10437>\
**Category:** Uncategorized\
**Created:** [January 1, 2003, 1:38am UTC](https://forum.kirupa.com/t/button/10437 "2003-01-01T01:38:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dysan\_max](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@dysan\_max](https://forum.kirupa.com/u/dysan_max)\
**Post date:** [January 1, 2003, 1:38am UTC](https://forum.kirupa.com/t/button/10437/1 "2003-01-01T01:38:10Z")

</div>

Hi guys,

How can I create a button that when you click on it will disappear for 10 to 20 sec then appear again?

Thanx

Dysan

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 1, 2003, 1:55am UTC](https://forum.kirupa.com/t/button/10437/2 "2003-01-01T01:55:29Z")

</div>

```auto

on(release){
	hideMe = function(){
		if (buttonName._visible = !buttonName._visible) clearInterval(buttonName.timer);
	}
	clearInterval(buttonName.timer);
	buttonName.timer = setInterval(hideMe, 10000);
}

```

where buttonName is the instance name of the button this code was put on. After 10 seconds (10000 miliseconds), it will hide, then after another 10 it will reappear

[edit]  
actually I think I missread… you probably want it to disappear immediately 😉

```auto

on(release){
	buttonName._visible = false;
	showMe = function(){
		buttonName._visible = true;
		clearInterval(buttonName.timer);
	}
	clearInterval(buttonName.timer);
	buttonName.timer = setInterval(showMe, 10000);
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 1, 2003, 3:33pm UTC](https://forum.kirupa.com/t/button/10437/3 "2003-01-01T15:33:14Z")

</div>

thank you so much…
