Whence the Yellow?
I have two SWF files, Main and External. Main pre-loads External. Then, when you click a particular button, External is displayed using Main.addChild().
In External's ADDED_TO_STAGE event handler I have the following code:
Main.stage.focus = External;
I need to set the focus because External also sets up KeyboardEvent handlers, and without this you have to click External to get the key listeners working.
Now for the yellow... When External appears on the screen, it has what appears to be a several pixel thick yellow border across the left and top sides. The border stays there unless I press the "up" arrow key, at which point it vanishes. No other key presses make the border disappear. I've also tried removing the key event listeners, but they have no effect, and pressing up WITHOUT any key listener still makes the yellow border disappear.
Why in the world is the yellow border appearing? And what is it? Any clue why the up arrow key would make it go away?
Now, I was able to prevent the yellow border from appearing by undoing my focus change thusly:
Main.stage.focus = External;
Main.stage.focus = Main;
I have no clue why, but this prevents/removes the yellow border and somehow still allows my key handlers to function. I had thought that setting the focus back would kill the key handlers, but apparently not.
Any insight into why undoing my focus change would have this effect?