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

What is Framer? Join the Community
Return to index
Wonjun Song
Posted Dec 13 - Read on Facebook

Hi all, just created first framer project and have few questions. I tried to duplicate a layer using layer.copy() method but wasn't able to figure out. I have dollar tag floating from bottom to outside of screen. I want to repeat that animation and would like to place on random x axis when animation begins (sort of like emitter). Oh also, is it possible to make page component move on click instead of swipe? Thank you. (I looked into Jordan's emitter example and couple others but having hard time translating into what I want to do)

3 Comments

Jonas Treub

You can snap to a certain page of the PageComponent using the following method: snapToPage()

To repeat an animation you can listen for the onAnimationEnd event. In the event callback you can set the x of the layer using Math.random() * range and restart the animation. Let me know if this makes sense to you.

Wonjun Song

Thank you so much Jonas. Will try and let you know if I still have problem!

Wonjun Song

Hi Jonas, I got the repeating animation to work. Thank you. What do I do if I want to duplicate same animation that happens simultaneously (like emitter)? I think I should use for loops but I don't know how to duplicate sketch layer (I tried, layer.copy() but didn't get it to work..). Here's link to framer. Thanks! http://share.framerjs.com/p4pwuk7cb19o/

Read the entire post on Facebook