This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Matthijs Otterloo
Posted Apr 26 - Read on Facebook

Hi everyone!

I'm trying to change a state based on an hover action.
For this I'm using the following code:

screens.thomasgmail.onMouseOver ->
print "MouseOver"

screens.thomasgmail.onMouseOut ->
print "MouseOut"

(Print is just for debugging this issue).
Changing the states just replaces the images, if I hove over the "thomasgmail" layer it keeps changing really quick between the old and the new one. Also the log shows:

» "MouseOver"
» "MouseOut"
» "MouseOver"
» "MouseOut"
» "MouseOver"
» "MouseOut"
» "MouseOver"
» "MouseOut"

Any idea on how to solve this? Is it a bug?




Floris Verloop

It could be that when you hide the "thomasgmail" layer, the onMouseOut event triggers because it's no longer visible. What happens in the "hidden" state exactly?

Matthijs Otterloo

Oh yeah! That could be right! In the hidden state the layer will be hidden.

Matthijs Otterloo

Solved it! Thanks Floris :)

Koen Bok

#protip you can use this snippet to quickly debug which layer gets clicked:

Read the entire post on Facebook