# Changing whether or not a button is clickable

**URL:** <https://forum.kirupa.com/t/changing-whether-or-not-a-button-is-clickable/13320>\
**Category:** Uncategorized\
**Created:** [February 11, 2003, 7:58pm UTC](https://forum.kirupa.com/t/changing-whether-or-not-a-button-is-clickable/13320 "2003-02-11T19:58:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [February 11, 2003, 7:58pm UTC](https://forum.kirupa.com/t/changing-whether-or-not-a-button-is-clickable/13320/1 "2003-02-11T19:58:22Z")

</div>

here’s my movie  
i’m working on some ideas for a site redisign and i have the content popping up in a lil window when a button is clicked

but while that lil window is open i don’t want the buttons on the main movie to be clickable b/c the window opens over some of them and the lil handcursor comes up. is there a way to make the buttons not clickable while the window is open?

run the movie and click one of the circles. then while the window is open click one of the circles that’s behind the window and you’ll see what i mean

---

<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:** [February 11, 2003, 8:16pm UTC](https://forum.kirupa.com/t/changing-whether-or-not-a-button-is-clickable/13320/2 "2003-02-11T20:16:27Z")

</div>

If you want to disable a specific button:

myButton.enabled = false;

And If you want to disable 'em all:

Button.prototype.enabled = false

Just add true if you want to enable them.

---

<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:** [February 11, 2003, 8:50pm UTC](https://forum.kirupa.com/t/changing-whether-or-not-a-button-is-clickable/13320/3 "2003-02-11T20:50:17Z")

</div>

can i put the button’s names in an array so i don’t have to write that line for every button i want disabled, but just add an object to the array?

thank you very much for your help

---

<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:** [February 12, 2003, 2:24pm UTC](https://forum.kirupa.com/t/changing-whether-or-not-a-button-is-clickable/13320/4 "2003-02-12T14:24:56Z")

</div>

Yeah why not!

Just made this small function:

```php
buttons = ["button1", "button2", "button3"];
_buttonFunction = function (DoUseHandCursor, ButtonArray, buttonAct) {
	for (i=0; i<buttons.length; i++) {
		ButtonArray*.enabled = buttonAct;
		Button.prototype.useHandCursor = DoUseHandCursor;
	}
};
_buttonFunction(false/*Disables hand cursor*/, buttons/* well use the array 'buttons' as the button target to get enabled or disabled*/, false/*If you want to enable your buttons, specify 'true' instead*/);

```
