I want to give a simple trick about how to change focus to specified movie clip. You may have problem with keyboard input when your movie clip are closed/unclosed by other movie clip, your movie clip don’t want to receive keyboard press event until you clik on your application window.
Here’s the trick :
this.stage.focus = mc;
mc is movie clip that you desired to receive keyboard event. I found there’s a problem remain. With code above maybe you’ll encountered annoying focus rectangle diplay. Usually this focus rectangle appear as yellow lines surrounding your movie clip.
To remove this annoying yellow lines, you should add another line like below:
this.stage.focus = mc; mc.focusRect = false;
Problem solved :)