如何检查如果SWF已聚焦在AS3 [英] How to check if the swf has been unfocused in AS3

查看:116
本文介绍了如何检查如果SWF已聚焦在AS3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是认为这将是有益知道如何检查,如果主权财富基金已经集中或以其他方式。当最终用户的阶段点击外侧(在浏览器的地址栏,例如)出现这种情况。

解决方案

  stage.addEventListener(Event.DEACTIVATE,notFocused);
stage.addEventListener(Event.ACTIVATE,集中);
功能notFocused(五:事件){
    跟踪(不集中);
}
功能重点(五:事件){
    跟踪(聚焦);
}
 

I just thought it would be useful to know how to check if an swf has been focused or otherwise. This situation arises when the end user clicks outside of the stage (on the address bar of the browser, for example).

解决方案

stage.addEventListener(Event.DEACTIVATE, notFocused);
stage.addEventListener(Event.ACTIVATE, focused);
function notFocused(e:Event) {
    trace("Not focused");
}
function focused(e:Event) {
    trace("Focused");
} 

这篇关于如何检查如果SWF已聚焦在AS3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆