W3cubDocs

/Phaser

Class: Phaser.MSPointer

Constructor

new MSPointer(game)

The MSPointer class handles Microsoft touch interactions with the game and the resulting Pointer objects.

It will work only in Internet Explorer 10+ and Windows Store or Windows Phone 8 apps using JavaScript.
http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx

You should not normally access this class directly, but instead use a Phaser.Pointer object which
normalises all game input for you including accurate button handling.

Please note that at the current time of writing Phaser does not yet support chorded button interactions:
http://www.w3.org/TR/pointerevents/#chorded-button-interactions

Parameters
Name Type Description
game Phaser.Game

A reference to the currently running game.

Source code: input/MSPointer.js (Line 23)

Public Properties

button : number

This property was removed in Phaser 2.4 and should no longer be used.
Instead please see the Pointer button properties such as Pointer.leftButton, Pointer.rightButton and so on.
Or Pointer.button holds the DOM event button value if you require that.

Source code: input/MSPointer.js (Line 67)

callbackContext : Object

The context under which callbacks are called (defaults to game).

Source code: input/MSPointer.js (Line 39)

capture : boolean

If true the Pointer events will have event.preventDefault applied to them, if false they will propagate fully.

Source code: input/MSPointer.js (Line 59)

enabled : boolean

MSPointer input will only be processed if enabled.

Default Value
  • true
Source code: input/MSPointer.js (Line 82)

event :MSPointerEvent | null

The browser MSPointer DOM event. Will be null if no event has ever been received.
Access this property only inside a Pointer event handler and do not keep references to it.

Type
  • MSPointerEvent | null
Source code: input/MSPointer.js (Line 75)

game : Phaser.Game

A reference to the currently running game.

Source code: input/MSPointer.js (Line 28)

<internal> input : Phaser.Input

A reference to the Phaser Input Manager.

Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source code: input/MSPointer.js (Line 34)

pointerDownCallback : Function

A callback that can be fired on a MSPointerDown event.

Source code: input/MSPointer.js (Line 44)

pointerMoveCallback : Function

A callback that can be fired on a MSPointerMove event.

Source code: input/MSPointer.js (Line 49)

pointerUpCallback : Function

A callback that can be fired on a MSPointerUp event.

Source code: input/MSPointer.js (Line 54)

Public Methods

onPointerDown(event)

The function that handles the PointerDown event.

Parameters
Name Type Description
event PointerEvent

The native DOM event.

Source code: input/MSPointer.js (Line 193)

onPointerMove(event)

The function that handles the PointerMove event.

Parameters
Name Type Description
event PointerEvent

The native DOM event.

Source code: input/MSPointer.js (Line 231)

onPointerOut(event)

The internal method that handles the pointer out event from the browser.

Parameters
Name Type Description
event PointerEvent

The native event from the browser. This gets stored in MSPointer.event.

Source code: input/MSPointer.js (Line 329)

onPointerOut(event)

The internal method that handles the pointer out event from the browser.

Parameters
Name Type Description
event PointerEvent

The native event from the browser. This gets stored in MSPointer.event.

Source code: input/MSPointer.js (Line 384)

onPointerUp(event)

The function that handles the PointerUp event.

Parameters
Name Type Description
event PointerEvent

The native DOM event.

Source code: input/MSPointer.js (Line 268)

onPointerUpGlobal(event)

The internal method that handles the mouse up event from the window.

Parameters
Name Type Description
event PointerEvent

The native event from the browser. This gets stored in MSPointer.event.

Source code: input/MSPointer.js (Line 305)

start()

Starts the event listeners running.

Source code: input/MSPointer.js (Line 124)

stop()

Stop the event listeners.

Source code: input/MSPointer.js (Line 420)

© 2016 Richard Davey, Photon Storm Ltd.
Licensed under the MIT License.
http://phaser.io/docs/2.6.2/Phaser.MSPointer.html