title: X and y coordinates while mousedown
body: <p>I am currently making a game that requires the player to drag around an object on a touch screen device.</p>
  
  <p>I've used the event listener <code>mousemove</code>, and it has worked on my Intel XDK emulator, but now that I move it to a touch screen device, I need an touch event that is <code>mousemove</code> and <code>mousedown</code>, and I am not sure how to do that.</p>
  
  <p>Example of ideal code:</p>
  
  <pre><code>canvas.addEventListener("mousemove" &amp;&amp; "mousedown", function(e){  
      pointerX = e.pageX;
      pointerY = e.pageY;
  }
  </code></pre>
  
  <p>So this ideal code spits out x and y when the mouse is down, and it has moved.</p>
  
  <p>If anyone knows the legit syntax or a different method of doing this, it would be a great help.</p>
  
  <p>I don't want to incorporate JQuery into this, just pure JS.</p>
  
  <p>Thanks! :)</p>
  
  <p><strong>Edit: Let me rephrase this so it is all straight forward. While the user is dragging an object I need a function that spits out x and y of the pointer the entire drag.</strong></p>