Base EaselJS Fiddle (with touch)
Sets up a canvas, stage, and tick
by dirkk0
HTML
<canvas id="canvas" width="800" height="600"></canvas>
JavaScript
var canvas = document.getElementById("canvas");
// FIX: Cancel touch end event and handle click via touchstart
document.addEventListener("touchend", function(e) { e.preventDefault(); }, false);
canvas.addEventListener("touchstart", function(e)
{
var ctx = canvas.getContext("2d");
var x = Math.random() * 320;
var y = Math.random() * 480;
var w = Math.random() * 100;
var h = Math.random() * 100;
ctx.fillStyle = "#FF0000";
ctx.fillRect(x,y,w,h);
// FIX: Cancel the event
e.preventDefault();
}, false);