• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Help with mouse-drag in html5

U

Uhfgood

Guest
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