- Most Wanted Bounty Winner
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 5-6 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Won a Competition
- Bought between 100 and 499 items
- Exclusive Author
- Referred between 200 and 499 users
Hello FlashDeners
Is there anyway to detect when the mouse is leaving the scene in a Flash AS2 movie? I want something different than a roll out event. I would like to test it using the mouse position or another way.. I know that you can do this in AS3 , but can it be done in AS2 too?
Thanks,
Ruben.
everything you can do in as2 you can do in as3 and more. anyway, it can be done in both as2 and 3 just check in a loop or interval the position of the mouse (between 1 and stage width – 2 and stage height -2) so you have a 1px border where it is leaving the stage. There is nog build in option for this though.
- Most Wanted Bounty Winner
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 5-6 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Won a Competition
- Bought between 100 and 499 items
- Exclusive Author
- Referred between 200 and 499 users
you can’t do it that way .. i already tried and the movie thinks that your mouse is always in inside.
In as3 you have the “onMouseOver” or something like event so you can’t do in as2 this. 
Ah i see what you mean, if you move fast the mouse stick to a old position for flash:
Anyway in as3 there is a event for it i saw:
stage.addEventListener(Event.MOUSE_LEAVE, onMouseLeave); function onMouseLeave(e:Event):void { trace(“the mouse has left the building”); }
In as2 is isn’t but you can use javascript and just say to flash when the mouse is of the embed flash element 
But there is another way founded here on flashden:
http://www.flashden.net/forums/thread/as20-detect-when-mouse-leaves-swf/8327

- Most Wanted Bounty Winner
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 5-6 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Won a Competition
- Bought between 100 and 499 items
- Exclusive Author
- Referred between 200 and 499 users
Thanks so much
I have to learn as3 
