当我把重点放在输入文本上时,我得到错误#1023。 有什么帮助吗?
mc.tabChildren = true;
mc.tabEnabled = true;
mc.getInputTxt().tabIndex = 0
mc.addEventListener(FocusEvent.FOCUS_IN,updateFocus);
private function updateFocus(e:FocusEvent):void{
stage.focus = e.currentTarget.getInputTxt()
}
答案 0 :(得分:0)
堆栈溢出,无限循环。
if (stage.focus != e.currentTarget.getInputTxt())
stage.focus = e.currentTarget.getInputTxt();
或者:
if (e.target == e.currentTarget.getInputTxt())
return;
stage.focus = e.currentTarget.getInputTxt();