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

What is Framer? Join the Community
Return to index
Maximilian Bredow
Posted Nov 10 - Read on Facebook

Say I want a layer with multiple states. Can I create a loop to create these states quicker?

I tried but it didn't make it work, I assume it's because it treats "i" as the name of a state

1 Comments

Alexandru Raduca

layer = new Layer

layer.states = []

for i in [0..5]
layer.states[i] =
y: i * 50
layer.onTap ->
layer.stateCycle()

Read the entire post on Facebook