Closed GoogleCodeExporter closed 8 years ago
FlashCanvas supports mousemove event.
Try the following example.
<!DOCTYPE html>
<html>
<head>
<!--[if lt IE 9]><script src="flashcanvas.js"></script><![endif]-->
<script>
var ctx;
window.onload = function() {
var canvas = document.getElementById("canvas");
ctx = canvas.getContext("2d");
canvas.onmousemove = draw;
}
function draw(event) {
event = event || window.event;
var x = event.clientX;
var y = event.clientY;
ctx.fillStyle = "red";
ctx.clearRect(0, 0, 600, 400);
ctx.fillRect(x - 25, y - 25, 50, 50);
}
</script>
</head>
<body>
<canvas id="canvas" width="600" height="400"></canvas>
</body>
</html>
Original comment by revu...@gmail.com
on 13 Feb 2013 at 5:25
Original issue reported on code.google.com by
n321...@gmail.com
on 10 Feb 2013 at 5:48