   [web] crossbrowser music switch + mousedown check?
  I'm working on a js snake game and I want to include a music switch. Problem is how to stop an embedded midi file? "href="&#106avascript:document.embeds['musicfile'].stop()"doesn't seem to work in most browsers.I also included a simple level editor to let people from the forums help me build levels, I already got a whole bunch of excellent designs. However clicking every individual cell becomes cumbersome very quickly, especially now I increased grid resolution.Currently an onclick (for every cell) will execute a function that either adds or removes the cell from the Walls array. But instead of checking onclicks, I want to put an onmouseover in every cell and check if the mouse button is down from within the function (so it becomes more like drawing). But I'm not sure how to check for this, as far as I know the mousedown event only fires once when the LMB is clicked so 'if(mouseDown)' doesn't seem to work.Is there any way to check if the mousebutton is being held down?See a WIP version here.   
  I don't know about the music, but the mouse button thing isn't hard. Just track it yourself. E.g.mousedown = false;function onMouseDown(ev) { mousedown = true; }function onMouseUp(ev) { mousedown = false; }function onMouseMove(ev){  if (mousedown)  {    // do something  }}Then hook those functions to their respective triggers in HTML.;  Works great, thanks for the idea!   