我只是认为了解如何检查 swf 是否已获得焦点会很有用。当最终用户在舞台外单击时(例如,在浏览器的地址栏上),就会出现这种情况。
最佳答案
stage.addEventListener(Event.DEACTIVATE, notFocused);
stage.addEventListener(Event.ACTIVATE, focused);
function notFocused(e:Event) {
trace("Not focused");
}
function focused(e:Event) {
trace("Focused");
}
关于actionscript-3 - 如何检查swf在AS3中是否已经失焦,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12373100/