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

What is Framer? Join the Community
Return to index
John Smith
Posted May 07 - Read on Facebook

I am currently running a for loop to create series of layers that I place within a page component

for i in [2..0]
slide = new Layer
width: Screen.width
height: 624
image: "images/slide"+i+".png"
x: 750 * i
name: "slide" + i
parent: carousel.content

For some reason I can't seem to reference the clips ie ( slide0.onTap -> et. etc.). There a reason for why I am unable to reference the layer by the name?


John Smith

Thanks for the explanation Ian.

Steve Ruiz

I agree with Ian that an array will be your best bet. I'd also recommend using carousel.addPage() rather than setting the new page using the layer's parent property.

John Smith

Thanks Steve.

Read the entire post on Facebook