Adobe Air 188.8.131.520 Beta 2BETA
# New features
* Mouse lock.
- A new mouseLock property has been added to Stage.
- To enable mouse locking set Stage.mouseLock to true. There are several rules which are applied here:
> This property can only be set in full screen mode. It dispatches a runtime exception if it is called in non-full screen mode.
> On mobile settings this property always throws an exception. The reason is simple: This feature can only work with a mouse type of devices and mobile devices do not have such a thing.
> The property can be read in non-full screen mode. This allows developers to easily dispatch to alternative input methods if mouse locking is disabled externally for some reason.
> When exiting full screen mode Stage.mouseLock is automatically set to false.
> Note that while in full screen mode mouse event listeners attached to other display objects but the stage will not be dispatched.
> In other words to receive mouse deltas and any other mouse event while mouseLock is active you need to attach your mouse event listeners to the stage.
* Relative mouse coordinates.
- New properties (movementX and movementY) on MouseEvent.
- When Stage.mouseLock == true:
> MouseEvent.localX and MouseEvent.localY will contain 0.
> MouseEvent.movementX and MouseEvent.movementY will contain delta values.
> MouseEvent.movementX and MouseEvent.movementY are never transformed based on stage transformation, i.e. they always remain in screen space.
> MouseEvent.movementX and MouseEvent.movementY will be 0 when Stage.mouseLock == false.
- Situations where mouse locking is disabled automatically and the mouse cursor is made visible again:
> When the user hits ESC.
> When the window loses focus, for instance when the user hit CTRL-TAB.
> When any settings UI is visible (that includes all privacy dialogs).When a native dialog is shown, for instance a file upload dialog.
* Right and middle click events.
- Just like with Adobe AIR, right and middle click events can now be used to inside Flash Player.
- When a listener is registered to the MouseEvent.RIGHT_CLICK event, the native context menu will not show up, allowing you to create your own context menu.