Air Native 窗口活动窗口更改

发布于 2024-12-08 15:20:31 字数 419 浏览 0 评论 0原文

我有一个有 2 个窗口的 Adob​​e Air 应用程序(AS3,不是 Flex)。当我从它们上单击到另一个桌面程序时,我收到一个“停用”事件(如您所料)。

当我点击 Window#1 时,我收到一个“激活”事件(如您所料)。

但是当我从 Window#1 转到 Window#2 时,我什么也没得到。我相信这是因为 Air 应用程序仍然是活动程序,只是一个不同的窗口。

但我需要知道何时从一个窗口转到另一个窗口。

到目前为止,我想出的可怕解决方案是使用 onEnterFrame 并检查当前窗口是否是活动窗口。但我更愿意用比这种黑客更好的方式来做这件事。

我已经完成了 Stage、NativeApplication 和 Native Window 事件,但它们都没有满足我的需要。谁能指出我可能忽略的另一个事件?

I have a Adobe Air app (AS3, not Flex) that has 2 windows. When I click away from them onto another desktop program, I get an "Deactivate" Event (as you would expect).

When I click on say Window#1 I get an "Activate" Event (as you would expect).

But when I go from Window#1 to Window#2, I get nothing. And I believe this is because the Air application is still the active program, Just a Different Window.

But I have the need to know when I go from 1 window to another.

The horrible solutions I have come up with so far is to have an onEnterFrame and check if the current window is the active window. But I would much prefer to do it a much better way that such a hack.

I have gone though Stage, NativeApplication and Native Window Events and none of them do what I need. Can anyone point me to another Event I may have overlooked?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

油饼 2024-12-15 15:20:31

直接在 NativeWindow 对象上侦听窗口激活事件。 (所有显示对象都会调度激活/停用事件,但这些事件是由应用程序(或浏览器中的 SWF 对象)获得或失去操作系统焦点触发的。)

Listen for window activation events directly on the NativeWindow object. (All display objects dispatch activation/deactivation events, but these are triggered by the application -- or SWF object in the browser -- getting or losing the OS focus.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文