# Gallery Question

**URL:** <https://forum.kirupa.com/t/gallery-question/276928>\
**Category:** Uncategorized\
**Created:** [December 5, 2008, 3:37am UTC](https://forum.kirupa.com/t/gallery-question/276928 "2008-12-05T03:37:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skelebunny](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@skelebunny](https://forum.kirupa.com/u/skelebunny)\
**Post date:** [December 5, 2008, 3:37am UTC](https://forum.kirupa.com/t/gallery-question/276928/1 "2008-12-05T03:37:52Z")

</div>

I have a gallery that loads external pics. I’d like to not be able to click on the button that the current thumbnail is on. I know how to remove the event listener when the button is clicked but I don’t know how I’d renable the button once you click on another thumbnail. This is the code I have:

[AS]

function loadPic(e:MouseEvent):void  
{  
bg\_mc.x = sWidth / 2;  
bg\_mc.y = sHeight / 2;   
picLoader.alpha = 0;  
picLoader.source = e.currentTarget.pic;   
e.currentTarget.removeEventListener(MouseEvent.CLICK, loadPic);  
e.currentTarget.buttonMode = false;  
}

[/AS]

What kind of function would I have to include to enable the thumbnails again when I’ve clicked on a different button other than the one I’m on?

Let me know if that makes any sense.

Thanks!
