Me again with stupid question #2... if you create a bunch of layers in a loop how can you go back and reference them individually? The normal array concept does not seem to work with layers unless I'm completely missing something..
You put them in an array. So you could create an empty array by writing 'layers = ', and then you could continue: 'for i in [0...10] layer = new Layer', and then: `layers.push layer'.
Then layers will be the first layer you created in the for loop, layers the second, and so on.
parentLyr = new Layer backgroundColor: "transparent"
for i in [0..6] lyr = new Layer name: "Layer" + i parent: parentLyr y: i * (100 + 10)
for child in parentLyr.children print child
If you have an array with layers let's say array1 = [layerA, layerB, layerC] you can access them via index: array1 ... array1 and so on.
worked like a charm thanks everyone!
and there's no such thing as a stupid question ;)
#protip use the .map function: http://share.framerjs.com/k21k15bde4tj/