currently my code works with this method:
canvas.addEventListener('mousemove', function(event) {....},false)
now I want to separate the function, make own function. like:
canvas.addEventListener('mousemove', myFunction(1), false)
canvas.addEventListener('mousedown', myFunction(0), false)
function myFunction (event, separator) {..}
but its not working
please help, thanks