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
Default Value:
  • 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 151

onPointerMove(event)

The function that handles the PointerMove event.

Parameters:
Name Type Description
event PointerEvent

The native DOM event.

Source - input/MSPointer.js, line 189

onPointerUp(event)

The function that handles the PointerUp event.

Parameters:
Name Type Description
event PointerEvent

The native DOM event.

Source - input/MSPointer.js, line 226

start()

Starts the event listeners running.

Source - input/MSPointer.js, line 106

stop()

Stop the event listeners.

Source - input/MSPointer.js, line 263
Phaser Copyright © 2012-2015 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-alpha10 on Wed Jul 22 2015 14:55:16 GMT+0100 (GMT Daylight Time) using the DocStrap template.