# Button.enabled = true;?

**URL:** <https://forum.kirupa.com/t/button-enabled-true/45069>\
**Category:** Uncategorized\
**Created:** [March 10, 2004, 5:53pm UTC](https://forum.kirupa.com/t/button-enabled-true/45069 "2004-03-10T17:53:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![333944](https://avatars.discourse-cdn.com/v4/letter/3/bbe5ce/32.png) [@333944](https://forum.kirupa.com/u/333944)\
**Post date:** [March 10, 2004, 5:53pm UTC](https://forum.kirupa.com/t/button-enabled-true/45069/1 "2004-03-10T17:53:14Z")

</div>

Hey y’all  
I’m having a pblm. when it comes to enabling a button(s) on/off … I have a file; that with Adam14 and Scotty’s help, I have working the way I want (swaping \_X/\_Y values), but when the button is cliked I want to disable it, untill another button is clicked… then enable it, and so on.

I thought of setting \_global flags inside the buttons but then you actually have to click them twice to trigger the flags??? so then I took those flags out of the buttons and put them onto a container movieclip that looks something like this:

onClipEvent (enterFrame) {  
if (\_global.flag1 == true) {  
\_root.box1.button1.enabled = false;  
\_root.box2.button2.enabled = true;  
\_root.box3.button3.enabled = true;  
} else if (\_global.flag2 == true) {  
\_root.box1.button1.enabled = true;  
\_root.box2.button2.enabled = false;  
\_root.box3.button3.enabled = true;  
} else if (\_global.flag3 == true) {  
\_root.box1.button1.enabled = true;  
\_root.box2.button2.enabled = true;  
\_root.box3.button3.enabled = false;  
}  
}

button1 gets disabled, but then never get’s enabled after that… The other buttons don’t even get disabled… sheeeeeeesh  
I’ve included the .fla, please help??? ;(
