Adobe AIR Native Extension that provides information about native mouse position and events
Switch branches/tags
Nothing to show
Pull request Compare This branch is 13 commits behind airext:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
NativeMouseBuild
NativeMouseLib
NativeMouseTest
NativeMouseWin
README.md

README.md

ActionScript Usage

Using NativeMouse is simple:

...
var nativeMouse:INativeMouse = new NativeMouse();

if (nativeMouse.isSupported())
{
	nativeMouse.addEventListener(NativeMouseEvent.NATIVE_MOUSE_MOVE, nativeMouseMoveHandler);
	
	nativeMouse.captureMouse();
}

private function nativeMouseMoveHandler(event:NativeMouseEvent):void
{
	this.label.text = new Point(event.mouseX, event.mouseY);
}
...

MXML Usage

In MXML use NativeMouseTag wrapper as follow:

...
<fx:Declarations>
	<tags:NativeMouseTag id="nativeMouse" enabled="true" />
</fx:Declarations>

<s:Label text="{nativeMouse.coordinates}" />
...