# Class: Touch

## Phaser. Touch

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

#### new Touch(game)

  Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `game` | Phaser.Game | A reference to the currently running game.

  Source:
    - input/Touch.js, line 15

### Members

#### callbackContext

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `callbackContext` | Object | The context under which callbacks are called.

  Source:
    - input/Touch.js, line 31

#### disabled

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `disabled` | boolean | You can disable all Touch events by setting disabled = true. While set all new touch events will be ignored.

  Source:
    - input/Touch.js, line 26

#### event

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `event` | TouchEvent | The browser touch DOM event. Will be set to null if no touch event has ever been received.

  Default Value:
    - null
  Source:
    - input/Touch.js, line 73

#### game

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `game` | Phaser.Game | A reference to the currently running game.

  Source:
    - input/Touch.js, line 20

#### preventDefault

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `preventDefault` | boolean | If true the TouchEvent will have prevent.default called on it.

  Default Value:
    - true
  Source:
    - input/Touch.js, line 67

#### touchCancelCallback

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `touchCancelCallback` | function | A callback that can be fired on a touchCancel event.

  Source:
    - input/Touch.js, line 61

#### touchEndCallback

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `touchEndCallback` | function | A callback that can be fired on a touchEnd event.

  Source:
    - input/Touch.js, line 46

#### touchEnterCallback

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `touchEnterCallback` | function | A callback that can be fired on a touchEnter event.

  Source:
    - input/Touch.js, line 51

#### touchLeaveCallback

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `touchLeaveCallback` | function | A callback that can be fired on a touchLeave event.

  Source:
    - input/Touch.js, line 56

#### touchMoveCallback

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `touchMoveCallback` | function | A callback that can be fired on a touchMove event.

  Source:
    - input/Touch.js, line 41

#### touchStartCallback

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `touchStartCallback` | function | A callback that can be fired on a touchStart event.

  Source:
    - input/Touch.js, line 36

### Methods

#### consumeTouchMove()

  Consumes all touchmove events on the document (only enable this if you know you need it!).

  Source:
    - input/Touch.js, line 171

#### onTouchCancel(event)

  Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome). Occurs for example on iOS when you put down 4 fingers and the app selector UI appears.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event.

  Source:
    - input/Touch.js, line 219

#### onTouchEnd(event)

  The handler for the touchend events.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event.

  Source:
    - input/Touch.js, line 330

#### onTouchEnter(event)

  For touch enter and leave its a list of the touch points that have entered or left the target. Doesn't appear to be supported by most browsers on a canvas element yet.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event.

  Source:
    - input/Touch.js, line 253

#### onTouchLeave(event)

  For touch enter and leave its a list of the touch points that have entered or left the target. Doesn't appear to be supported by most browsers on a canvas element yet.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event.

  Source:
    - input/Touch.js, line 282

#### onTouchMove(event)

  The handler for the touchmove events.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event.

  Source:
    - input/Touch.js, line 304

#### onTouchStart(event)

  The internal method that handles the touchstart event from the browser.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event.

  Source:
    - input/Touch.js, line 185

#### start()

  Starts the event listeners running.

  Source:
    - input/Touch.js, line 121

#### stop()

  Stop the event listeners.

  Source:
    - input/Touch.js, line 359