# Disable button

**URL:** <https://forum.kirupa.com/t/disable-button/287230>\
**Category:** Uncategorized\
**Created:** [April 28, 2009, 11:24am UTC](https://forum.kirupa.com/t/disable-button/287230 "2009-04-28T11:24:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RossKidd](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@RossKidd](https://forum.kirupa.com/u/RossKidd)\
**Post date:** [April 28, 2009, 11:24am UTC](https://forum.kirupa.com/t/disable-button/287230/1 "2009-04-28T11:24:13Z")

</div>

I have a button class which disables the current button when it is clicked, the problem is I need to restore the mouseclick event to all the other button or eventually if you work through the menu all the button will be disabled. How can I iterate through all non-clicked items and restore the clicks to the non-clicked buttons?

public function onClick(e:MouseEvent)

```
    {
        
        
this.parent.gotoAndStop(e.target.name);
 e.target.removeEventListener(MouseEvent.CLICK, onClick);
        

    }
```
