Button Click Disables Keyboard

I am rather new to AS3 and I have a few difficulties with the new buttons usage. I have a Document Class in which the Keyboard is used to navigate a Child. There is also another Child of a different class, which is kind of a popup box that you can open and close by separate buttons. The close button lies inside the popup box class. However, when I click this button to close the box, removing the Child, keyboard actions don’t react until I click on the screen once more.

The same happens when I click a button that goes to the next frame, in which the button isn’t there anymore, but keyboard actions are requested. But they only work, once I click inside the swf screen again.

Is there a way to, like, switch back to the Document Class, like a focus? Or does anybody know a place that explains the new way of using buttons? I am pretty confused by that.