Spork Mouse Events

mouseDown

Whenever the mouse button is down, the variable mouseDown is set to true. When the mouse button is released, the variable is set to false. The example below is the same as the onmousemove() example, except a circle is only drawn if the mouse is down.
function onmousemove(){
  if (mouseDown)
    circle(mouseX,mouseY,20);
}