I want to achieve AS3 .0 MOUSE _LEAVE Event with AS2 .0
onMouseMove + timer, hitTest, rollOut doesn’t work good.
Any solutions?
- Exclusive Author
- Item was Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Sold between 100 000 and 250 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- India
I want to achieve AS3 .0 MOUSE _LEAVE Event with AS2 .0
onMouseMove + timer, hitTest, rollOut doesn’t work good.
Any solutions?
Very difficult. Usually the _xmouse, _ymouse properties fails to detect the mouse position (if moved faster).
As per my experience, the only way to detect this is keeping an invisible button that covers entire stage size and placing it below all the elements. Sense the onRollout. However, we need to be careful to set conditions as other buttons inside the stage will interfere with this. I did this on several works with some success but not an 100% solution. This is a major issue especially when we need to change cursor.
I found one solution [maybe]. Check this example
actionscript ::: download source
What you think?
- Exclusive Author
- Item was Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Sold between 100 000 and 250 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- India
I found one solution [maybe]. Check this example
actionscript ::: download source What you think?
Thanks so much djankey, this works better than other known ways! I tested after adding some elements such as buttons, components etc and works perfectly. I will use it on my files 
- Author was Featured
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 6-7 years
- Interviewed on the Envato Notes blog
- Item was Featured
- Microlancer Beta Tester
- Referred between 200 and 499 users
right click and then leave the swf file’s area, this is not the case with AS3 MOUSE _LEAVE 
- Exclusive Author
- Item was Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Sold between 100 000 and 250 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- India
Haha, not a problem as long as we don’t force the user to right click to interact with something 
Edit: I tested again and it is not working if we keep the mouse very near to stage edge and suddenly move outside 
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Grew a moustache for the Envato Movember competition
- Has been a member for 4-5 years
- Item was Featured
- Microlancer Beta Tester
- Referred between 10 and 49 users
it does not work at all…
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Grew a moustache for the Envato Movember competition
- Has been a member for 4-5 years
- Item was Featured
- Microlancer Beta Tester
- Referred between 10 and 49 users
i have an idea.. is there a way that javascript checks the mouse over on a object.. so if we can check it using javascript, we can send flash a feedback with externalInterface.. this seems a possible way or am i stupid? 
i have an idea.. is there a way that javascript checks the mouse over on a object.. so if we can check it using javascript, we can send flash a feedback with externalInterface.. this seems a possible way or am i stupid?![]()
No, you’re not stupid, this seems to work 
- Exclusive Author
- Item was Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Sold between 100 000 and 250 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- India
When we go for javascript, there are many complications such as browser support, educating the buyers to implement it on html etc. This code mentioned by djankey is >95% perfect.
It doesn’t works only when we keep the mouse on 2-3 pixels near to the edge of stage and move the mouse faster outside.
