755 posts
  • 8 Years of Membership
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
+6 more
djankey
says

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

6231 posts
  • Exclusive Author
  • Elite Author
  • Author Level 8
  • 7 Years of Membership
+13 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
  • 8 Years of Membership
  • Affiliate Level 3
  • Author Level 6
  • Beta Tester
+6 more
djankey
says

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

6231 posts
  • Exclusive Author
  • Elite Author
  • Author Level 8
  • 7 Years of Membership
+13 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 :)

2486 posts Premium Scripts, Plugins and Themes
  • 8 Years of Membership
  • Affiliate Level 5
  • Author Level 8
  • Beta Tester
+9 more
LucidStudios
says

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

6231 posts
  • Exclusive Author
  • Elite Author
  • Author Level 8
  • 7 Years of Membership
+13 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
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
+9 more
Pdesignx
says

it does not work at all…

1389 posts
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
+9 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
  • 7 Years of Membership
  • Affiliate Level 1
  • Author Level 2
  • Brazil
+2 more
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

6231 posts
  • Exclusive Author
  • Elite Author
  • Author Level 8
  • 7 Years of Membership
+13 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