Phaser. MSPointer

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 - input/MSPointer.js, line 23

Members

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 - input/MSPointer.js, line 67

callbackContext :object

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

Source - 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 - input/MSPointer.js, line 59

enabled :boolean

MSPointer input will only be processed if enabled.

Default Value:
  • true
Source - 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 - input/MSPointer.js, line 75

game :Phaser.Game

A reference to the currently running game.

Source - 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 - input/MSPointer.js, line 34

pointerDownCallback :function

A callback that can be fired on a MSPointerDown event.

Source - input/MSPointer.js, line 44

pointerMoveCallback :function

A callback that can be fired on a MSPointerMove event.

Source - input/MSPointer.js, line 49

pointerUpCallback :function

A callback that can be fired on a MSPointerUp event.

Source - input/MSPointer.js, line 54

Methods

onPointerDown(event)

The function that handles the PointerDown event.

Parameters:
Name Type Description
event PointerEvent

The native DOM event.

Source - 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 - 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 - 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 - 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 - 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 - input/MSPointer.js, line 305

start()

Starts the event listeners running.

Source - input/MSPointer.js, line 124

stop()

Stop the event listeners.

Source - input/MSPointer.js, line 420