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

What is Framer? Join the Community
Return to index
Thomas Offinga
Posted Aug 04 - Read on Facebook

I'm trying to figure out a way to get the index of a layer inside an array, but I'm not sure what the proper syntax is.

buttons = []
for i in [0..4]
button = new Layer


button.onClick ->
print button.i
print buttons

Is there any way to figure out what the position if of the button within the array?


Kees Plattel

button.onClick ->
print this.index

Or: = "button_ " + i

button.onClick ->

Marc Krenn


Pascal Verstegen

Go drunk Thomas you're home

Игорь Растворов

index - 1

Read the entire post on Facebook