title: How to only execute onmousemove function if onmousedown is active
body: <p>I don't usually use vanilla js, and I simply can't make this happen. handleTilePressed is the function I want to execute, but I don't know how to make it so that onmousemove only works if onmousedown is active.</p>
  <pre><code>    tile.onmousemove = function() { handleTilePressed(i) }
  </code></pre>
  <p>Any help is greatly appreciated.</p>