KeyBoardEvent

顺便提一句 在纯Flash CS环境下
初始要这样写
stage?init(null):addEventListener (Event.ADDED_TO_STAGE, init);

if(stage != null)
{
  init(null);
}
else
{
  addEventListener (Event.ADDED_TO_STAGE, init);
}

这样的写法更正规。不要使用
addEventListener (Event.ADDED_TO_STAGE, init);
因为有可能stage已经初始化好了。so init永远不会执行了

=========================================================

键盘事件只适用与stage来侦听。其他的先是对象的话,
必须要首先让stage.focus=dis才可以生效。

原文地址:https://www.cnblogs.com/naiking/p/3460075.html