I'm messing about with Canvas in Adobe Air. But their seems to be some issue with the mouse coordinates. The more I click towards the right, the difference between the draw position and actual click increases. My code is
Wb.canvas.fillRect(evt.clientX-canvasTag.clientX, evt.clientY-canvasTag.clientY, 50, 50);