# AS3 button MC inside container does not work

**URL:** <https://forum.kirupa.com/t/as3-button-mc-inside-container-does-not-work/322830>\
**Category:** flash\
**Created:** [June 5, 2011, 3:07am UTC](https://forum.kirupa.com/t/as3-button-mc-inside-container-does-not-work/322830 "2011-06-05T03:07:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RubenDoliveira](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rubendoliveira/32/3905_2.png) [@RubenDoliveira](https://forum.kirupa.com/u/RubenDoliveira)\
**Post date:** [June 5, 2011, 3:07am UTC](https://forum.kirupa.com/t/as3-button-mc-inside-container-does-not-work/322830/1 "2011-06-05T03:07:38Z")

</div>

Hi everyone,

I’ve added a sprite container like this:

```auto

var container:Sprite = new Sprite;
addChild(container);

```

I then have a movieclip inside “container” which I declared as a button:

```auto

container.addChild(mc);
mc.buttonMode = true;

```

The problem is that mc does not work as a button, if inside the container. If I add mc to the stage outside of container, it works:

```auto

addChild(mc);
mc.buttonMode = true;

```

So the problem is in the container. I never had this problem before. Any ideas?

Thanks
