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

What is Framer? Join the Community
Return to index
John Grendon Enderby
Posted Feb 19 - Read on Facebook

Hello folks, another one from me. Lets say I'm creating layers in a for loop and setting the x value so they all start stacked on top of each other. How do I then animate the x value so that these layers spread out? Been trying a little while now and I'm sure there is a way to do this. Setting the spread out version in the for loop is easy, but spreading from flat seems like an oddly weird one! If i were setting it in the for loop it would be x: (j*200)+560, but what I want to do is set the x value to 560 and then animate to the above. Hopefully this makes sense! Thanks in advance!


John Grendon Enderby

The only thing i have found while playing around is this: x: (retailer.index * 195) - 15

Ben Rodenhäuser
John Grendon Enderby

Yep exactly that! Thanks again :)

John Grendon Enderby

Any idea why this doesn't work? image = "images/" + [j+1] + ".png" worked in another proto

John Grendon Enderby

ok, changed it

John Grendon Enderby

never mind

George Kedenburg III

protip: you can just do image = "images/#{[i+1]}.png"

Read the entire post on Facebook