Detecting mouse outside flash
- Started
- Last post
- 7 Responses
- bk_shankz0
Well I can't quite work it out but thanks for helping..
- mikotondria20
Could you not just havea blank MC offstage even, with an enterFrame OCEvent, seeing if the _rrot._xmouse and _ymouse is within the stage size ?
I know the problem you mean about hanging menu items..
I think Ive used a combination of huge hit area to catch the mouse coming off the button AND a blank 'mouse tester' MC..
Just seems like the player cant keep up sometimes, dunnit ?
- bk_shankz0
I know the flash experts responded already but is there anyone else who has got this working?
- golden_bouy0
Ive done this before, worked well. what I did was create a MC which had 50 frames in, on mouse move the playhead would move back to frame 1 and repeat on mouse.move, if flash didnt detect movement the playhead continued until it got to frame 50 and cleared the movie clip.
like an expert!!!
- unfittoprint0
one way is to create a thick border MC, the same size as the Flash Movie and use something like:
trigger.onRollOver=function(){
if(status==true || status==undefined) {
mouseMC._visible=false;
} else{
mouseMC._visible=true;
};
}
- bk_shankz0
Yeah I've tried a lot of things like this but I can't get the mouse on exiting to register 100% of the time. I tried a setInterval with a hitTest and this doesn't work either.
- gabe0
you might be able to put this on the root...
onEnterFrame = function()
{
if( hitTest ( _root._xmouse, _root._ymouse, false ) )
{
do something
}
}