using touch to activate an event
<p>I am working on a game based off of <a href="http://www.lostdecadegames.com/how-to-make-a-simple-html5-canvas-game/" rel="nofollow">this</a> but trying to implement it to work on a Touch device. the code for if they are touching is still the same;</p>

<pre><code>if (
    reggie.x &lt;= (monster.x + 32)
    &amp;&amp; ball.x &lt;= (reggie.x + 32)
    &amp;&amp; reggie.y &lt;= (monster.y + 32)
    &amp;&amp; ball.y &lt;= (reggie.y + 32)
) {
    ++ballsCollected;
    reset();
}
</code></pre>

<p>to make it to where you do not need a directional pad on a touch device I am trying to figure out how to make it where if you clicked on ball it then adds one to ballsCollected. I've looked at using Touch Events but i am not sure how I would go about making it work.</p>

<p>if there is a way to move reggie by dragging him with your fingers to make the two objects connect and still add one that would be cool and add a bit of a challenge. </p>

<p>any help or point in the right direction would be helpful.</p>
