iam planning to make a flashgame that requires the player to aim with his mouse. so there will be a crosshair. now i have the problem that whenever the mouse leaves the embedded flash stage and clicks outside this frame.. the player has to click in the flash field again to be able to play again. that sucks. is it possible in flash to lock the mouse in the gamewindow?
Share
The short answer: no.
The long answer: You can only control mouse events and movement constraints within the scope of your SWF; you cannot control what happens outside of it. You can create bounds for your cross-hair movieclip, which will keep it from roaming off the stage, but you cannot prevent a user from clicking outside of the
<iframe>or<embed>. The only realistic option you have is to make your game full-screen.