1
我想鼠標點擊屏幕座標(點擊以外的AIR應用程序窗口)讓鼠標點擊screenX和screenY在AS3
我嘗試以下,但我沒有得到任何東西,它看起來像ScreenMouseEvent。未分派CLICK事件。
public function Main():void
{
if (NativeApplication.supportsSystemTrayIcon)//testExpression return true
{
SystemTrayIcon(NativeApplication.nativeApplication.icon).
addEventListener(ScreenMouseEvent.CLICK, click);
}
}
private function click(e:ScreenMouseEvent):void
{
trace(e.screenX);//nothing displayed :(
}
我以前從來沒有使用'ScreenMouseEvent',但它看起來像它只是從'SystemTrayIcon'類調度。你可能必須以某種方式添加你的監聽器。 文檔的ScreenMouseEvent:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/ScreenMouseEvent.html – 2013-04-08 01:26:42