Hi guys ! I'm a beginner in Framer and I'm working with array right now. I have an array with elements from the design page :
playlist = [playlist_1, playlist_2, playlist_3]for i in [0...playlist.length] playlist[i].opacity = 0
And then I want them to have the same animation on hover of each individually but I'm stuck there, how should I declare my Events.MouseOver function in relation with the array ?
Thanks a lot guys !
You can just loop over an array with layers. Then you can add an event listener to each of them. Be sure to use 'this' instead of the layer variable inside the event callback. Else you will only be able to change the last item of the array. Here is an example: https://framer.cloud/XCOee
Be sure to checkout our programming guide if you want to get a deeper understanding https://framer.com/getstarted/guides/programming/