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

What is Framer? Join the Community
Return to index
Klaus Klausens
Posted Feb 27 - Read on Facebook

Hey guys,

how can i access individual layers that i created with a for loop?


Nitin Sampathi

Use "MyLayers.onClick -> print" inside of the for loop. So change "layer2" to whatever you're using when first creating each layer, in this case it's "MyLayers". Then, indent it over so it's *inside* of the for loop. This adds an onClick event to each layer that's created for each iteration in the for loop.

This is a good resource that helped me with some programming basics:

Klaus Klausens

Thank you! But isn't it possible to change properties of a specific layer (for example layer2) outside the for loop after they have been created?

Lukas Guschlbauer

With FindForFramer-Component you can select a layer by its name

Nitin Sampathi

Klaus Klausens, Lukas Guschlbauer posted a module which should work for you! or push the created layers into an array which you can access later.

Klaus Klausens

Cool! Thanks everyone!

Brian Williams

Add them to an array

Read the entire post on Facebook