755 posts
  • Beta Tester
  • Bought between 100 and 499 items
  • Croatia
  • Exclusive Author
  • Has been a member for 7-8 years
  • Referred between 50 and 99 users
  • Sold between 50 000 and 100 000 dollars
djankey says

I want to achieve AS3 .0 MOUSE _LEAVE Event with AS2 .0
onMouseMove + timer, hitTest, rollOut doesn’t work good.
Any solutions?

5766 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 6-7 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+3 more
VF says
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.

755 posts
  • Beta Tester
  • Bought between 100 and 499 items
  • Croatia
  • Exclusive Author
  • Has been a member for 7-8 years
  • Referred between 50 and 99 users
  • Sold between 50 000 and 100 000 dollars
djankey says

I found one solution [maybe]. Check this example
actionscript ::: download source What you think?

5766 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 6-7 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+3 more
VF says
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 :)

2485 posts Premium Scripts, Plugins and Themes
  • Bought between 10 and 49 items
  • Elite Author
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 7-8 years
  • Interviewed on the Envato Notes blog
  • Referred between 200 and 499 users
+1 more
LucidStudios says

right click and then leave the swf file’s area, this is not the case with AS3 MOUSE _LEAVE ;)

5766 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 6-7 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+3 more
VF says

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 :(

1389 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Grew a moustache for the Envato Movember competition
  • Has been a member for 6-7 years
  • Referred between 10 and 49 users
+3 more
Pdesignx says

it does not work at all…

1389 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Grew a moustache for the Envato Movember competition
  • Has been a member for 6-7 years
  • Referred between 10 and 49 users
+3 more
Pdesignx says

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? :D

563 posts
  • Bought between 1 and 9 items
  • Brazil
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
LuizZak says
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? :D

No, you’re not stupid, this seems to work :D

5766 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 6-7 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+3 more
VF says

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.

by
by
by
by
by
by