I'm really scratching my head here... Why am I getting the correct value for i placed in the html here, but every time I click to retrieve my layer's name, I get the last number iterated?
Actually, this doesn't seem to have anything to do with the iterator value. If I insert my own data, clicking each box always returns the value of the last layer pushed to the array. http://share.framerjs.com/vl2uepxb3ud9/
To get around this, use the layer argument from the callback:http://share.framerjs.com/j5i3dtjfyv5w/
In the simplest language, the layer value in your click handler references to whatever layer is at the click moment, not when you set the handler up.
Ah, so simple! Thanks, Koen.
layer name is a different property that you have to set. Maybe this also helps you: http://share.framerjs.com/h4lu7bdu3gvq/