检查系统聚焦 [英] check for system focus

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

问题描述

我有一个激活和停用事件处理程序,当用户单击内部或浏览器或Flex应用程序的浏览器窗口外触发的主要应用。由于我对我的应用程序做了一些细微的变化(我怀疑意外由Adobe)激活和关闭事件不再触发。是否有功能的hasFocus型我可以打电话,而不是在enterFrame例如:

I have an activate and deactivate event handlers for the main Application that trigger when the user clicks inside or outside the browser or flex application browser window. Due to some subtle changes I made to my app (I suspect unforeseen by Adobe) activate and deactivate events are no longer triggered. Is there a hasFocus type function I can call instead in enterFrame for example

推荐答案

我建议将事件处理程序在JavaScript听取重点和放大器;模糊的Flash DOM对象的事件。如果这些事件火灾,通过ExternalInterface的,你可以通知Flash影片,并根据需要处理它。

I'd suggest adding event handlers in JavaScript listening to the focus & blur events of the Flash DOM object. If either of these events fires, via externalInterface you can inform the Flash movie and handle it as desired.

Flash有一个事件Event.ACTIVATE而当鼠标离开舞台MOUSE_OUT鼠标事件,但他们并不总是很准确。该MOUSE_OUT事件,特别是会不会,如果你按住鼠标按钮,拖动外线火力。说真的,JavaScript是最好的选择这里。

Flash has an event for Event.ACTIVATE and a MOUSE_OUT mouse event when the mouse leaves the stage, but they're not always very accurate. The MOUSE_OUT event, in particular, won't fire if you're holding down a mouse button as you drag outside. Really, JavaScript is the best bet here.

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

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