# Can I constrain mouse to loaded swf? (beginner question)

**URL:** <https://forum.kirupa.com/t/can-i-constrain-mouse-to-loaded-swf-beginner-question/307549>\
**Category:** flash\
**Created:** [April 5, 2010, 9:20pm UTC](https://forum.kirupa.com/t/can-i-constrain-mouse-to-loaded-swf-beginner-question/307549 "2010-04-05T21:20:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wullem](https://avatars.discourse-cdn.com/v4/letter/w/7cd45c/32.png) [@Wullem](https://forum.kirupa.com/u/Wullem)\
**Post date:** [April 5, 2010, 9:20pm UTC](https://forum.kirupa.com/t/can-i-constrain-mouse-to-loaded-swf-beginner-question/307549/1 "2010-04-05T21:20:35Z")

</div>

Hi folks,

I built a movie in flash CS4 based on the tutorial here:  
[http://www.kirupa.com/developer/flashcs3/detecting\_when\_mouse\_leaves\_movie.htm](http://www.kirupa.com/developer/flashcs3/detecting_when_mouse_leaves_movie.htm)

Now if I load this swf into a bigger SWF the mouse is acting in the entire movie as if it were in de loaded swf.

This also happens when I test it (ctrl-enter) and make the resulting box bigger… the mouse will not fade at the border of the swf any more, but at the border of the containing window…)

is there a (easy) way to constrain the mouse behaviour within the box of the loaded swf (like the MOUSELEAVE event triggered when i leave the box of the loaded swf in stead of the entire stage?)

Thanks!
