Page 1 of 1

Difference Between Mouse OVER and Mouse ENTER?

Posted: Sun Aug 11, 2019 4:20 am
by 1uv3
Hi,

What is the difference between Mouse OVER and Mouse Enter? I see no difference in the functionality and the description over here https://ggnome.com/wiki/Skin_Sources for both say pretty much the same thing except for different wording.

Thanks!

Re: Difference Between Mouse OVER and Mouse ENTER?

Posted: Sun Aug 11, 2019 6:52 am
by Tony
Hi,

I had to do a bit of research on this one :-)

A mouse over event occurs on an element when you are over it - coming from either its child OR parent element, but a mouse enter event only occurs when the mouse moves from outside this element to this element.

Here's a sample file that visually shows the difference https://p2vrtutorials.s3-ap-southeast-2 ... index.html

Here's a more practical sample that shows two rectangles in a skin, the Green Square has a mouseover action and the purple square has a mouseenter action. Aside from the over/enter all other settings are the same but the results are quite different with the green square action "bubbling".

https://p2vrtutorials.s3-ap-southeast-2 ... index.html

This page gives a very comprehensive overview of the two functions https://javascript.info/mousemove-mouse ... mouseleave

cheers,

Tony

Re: Difference Between Mouse OVER and Mouse ENTER?

Posted: Sun Aug 11, 2019 10:39 am
by 1uv3
Hi Tony!

Thank you for that!! I must say that I feel like I bit of an idiot after reading the js overview page. I think I may have strained my brain a little too hard trying to digest all that :?

You always seem to have a pretty good handle on this stuff so riddle me this :D ...... when would you use one over the other? There's got to be some sort of practical use for one over the other given certain situations that can be explained in layman terms ;-) Just pretend you're trying to explain it to a 10 year old and I might get it :-) Haha! No guarantees there!

Again thanks for putting all that together Tony!

Re: Difference Between Mouse OVER and Mouse ENTER?

Posted: Sun Aug 11, 2019 5:23 pm
by Hopki
Hi Guys,
Also, Mouse Over is like a press source action while Mouse Enter is like a Mouse Click source action.

So, as an example, add a rectangle with a Mouse Over, pan left action, while the mouse is in the rectangle the pano will rotate.
If you then change it to Mouse Enter, when your mouse enters the rectangle the pano will pulse once to the left and stop.

This can be useful when used with a change relative position say in a thumbnail menu
See attached.
Regards,
Hopki

Re: Difference Between Mouse OVER and Mouse ENTER?

Posted: Sun Aug 11, 2019 8:31 pm
by 1uv3
Hopki wrote:
Sun Aug 11, 2019 5:23 pm
Mouse Over is like a press source action while Mouse Enter is like a Mouse Click source action.
BAM! That's the dumbed down version I was looking for :-) HAHA! Thanks for the explanations Tony and Hopki!

We are definitely lucky to have you both here helping us in the forums :-)