Mouse frustration!

in general roughly

  • the function mouseClicked() is called when clicking and immediately releasing mouse
  • the function mousePressed() is called (once!) when clicking and holding mouse. To start drag and drop for example or to get a fast reaction to mouse input.
  • the function mouseReleased() is called to end drag and drop
  • the variable(!!!) mousePressed is an inbuilt variable. It is true while mouse is down. That’s good when you use it in draw() to draw continuuesly.

Please check reference for these.

For a cool example : Help with dragging images! - #2 by Chrisir