ENABLETOUCH(SWALLOW, PRIORITY)

Enables touch events. Component will start receiving events for three functions
If swallow (optional) is set to true, then entities with lower priority will not receive their touch events.
priority (optional) can be negative or positive. Based on priority engine will device who receive touch event first

touchBegin(point)– player touches the screen
touchMove(point) – player moves a finger
touchEnd – player lifts a finger

Add this extra code to your component in order to handle these new events:

function touchBegan( point ){
  //player touches the screen
  /*Return true or false to tell if touch should be swallowed. If touch is swallowed, then other touch events with lower priority will not be triggered*/
  return true; 
}
component.touchBegan = touchBegan;

function touchMove( point ){
  //player moves a finger
}
component.touchMove = touchMove;

function touchEnded(){
  //player lifts a finger
}
component.touchEnded = touchEnded;