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

What is Framer? Join the Community
Return to index
Pedro Alejandro Wunderlich
Posted Oct 25 - Read on Facebook

Using a for loop, how do I get an animation to apply to all layers and not just the one? I can't figure it out. I've managed to get a stateCycle going for each layer using a "this." but can't make it work with the animation. Here's the code if you'd like to fiddle:

http://share.framerjs.com/d8cgy44y7mq9/

(funny, didn't know FB didn't animate gifs.)

2 Comments

Andreas Wahlström

it's a scope issue. the easiest way is to move your Animation definitions into the click event and use this for the layer property. the pop1 and pop2 variables are currently overridden every iteration

Pedro Alejandro Wunderlich

YAAASSS! It worked. Thank you for taking a minute to check it out. Here's the prototype of the final code for anyone having similar issues. Thanks Andreas Wahlström!!

http://share.framerjs.com/4o0sz7zfgt1i/

Read the entire post on Facebook