AS3 button inside container isn't working

Hi everyone,

I’ve added a sprite container like this:


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

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


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:


addChild(mc);
mc.buttonMode = true;

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

Thanks

Where is the ‘mc’ being created? On stage already or linked from the library?