在mxml里监听addedToStage事件

protected function application1_addedToStageHandler(event:Event):void
            {
                this.stage.focus=this
                this.stage.addEventListener(KeyboardEvent.KEY_DOWN, application1_keyDownHandler);
            }

在嵌入SWF的html里面加入如下的功能:

<body onload="document.getElementById('swf id').focus()"> 

 或者可以修改index.template.html

<body onload="document.getElementById('${application}').focus()">

 

相关文章:

  • 2021-11-11
  • 2022-12-23
  • 2021-09-10
  • 2021-07-12
  • 2022-12-23
  • 2021-12-05
  • 2021-10-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案