Help with mouse-drag in html5

Uhfgood

Member
So I'm making a breakout clone and I'm running into a small issue. I've got it to where you can use the mouse to drag the paddle (like a scrollbar) -- which is the way I want it to work, and it stops at the wall objects. The small problem I have right now is if I'm holding down the mouse button, and I move outside the window (in html5 target) and let go, as soon as I move the mouse back onto the screen, the paddle continues to follow the mouse.

I need to know if the mouse is completely outside the window so I can tell it to no longer drag the paddle, is there a way to do this?
 
Top