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?
Thanks for the explanation Ian.
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.