# A mouse-focus based pause function for a game?

**URL:** <https://forum.kirupa.com/t/a-mouse-focus-based-pause-function-for-a-game/253772>\
**Category:** flash\
**Created:** [March 5, 2008, 12:07am UTC](https://forum.kirupa.com/t/a-mouse-focus-based-pause-function-for-a-game/253772 "2008-03-05T00:07:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanaeda](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@kanaeda](https://forum.kirupa.com/u/kanaeda)\
**Post date:** [March 5, 2008, 12:07am UTC](https://forum.kirupa.com/t/a-mouse-focus-based-pause-function-for-a-game/253772/1 "2008-03-05T00:07:14Z")

</div>

Okay, the title sounds cryptic, but here’s what I mean -

So your playing a flash game that’s fast paced and mouse-based (hey that rhymes somewhat)… And then you accidentally move your mouse outside of the area of the swf… And then it pauses automatically with a “Continue” button, instead of you just dying or whatever. I’ve thought you could have a huge button the size of the stage and make it do something when the frame isn’t ‘mouseover’ or whatever, but there’s gotta be a better way. Also setting limits on the \_xmouse and \_ymouse wouldn’t work cos sometimes the mouse moves too fast for them to accurately get the last mouseposition… So how would I do it? Any clues?
