Hey guys, I'm sure this has come up before but I couldn't find an answer.
I'm trying to create two states for every layer in a loop, but for some reason the states are only affecting the last layer in the loop, and nothing else. Any ideas?
The layer divider is overwritten all the time, thats why only the last layer gets the states. You could do a new loop where you iterate through the layers and add the states but use @states.add instead. That should work. @ means "self" in this case.
But share the prototype and we can have a look!
Maybe using "do ->" will solve your problem?http://rzrsharp.net/2011/06/27/what-does-coffeescripts-do-do.html
Anton Jarl Florian Pnn here's the prototype http://share.framerjs.com/gzy6onpyb1pa/
Anton Jarl, sorry what would I replace with @states.add??
JT White, here's what you're looking for. Just take states.add out of your for loop and place it in another for loop, where it will cycle over each sublayer of nav, and add states to each.https://www.facebook.com/groups/framerjs/permalink/752196191574121/?comment_id=752198424907231&offset=0&total_comments=2&comment_tracking=%7B%22tn%22%3A%22R%22%7D
Chris Camargo and Anton Jarl thanks so much for your reply. Unfortunately I'm still struggling to create the new loop... Any chance you could quickly jump into my prototype and show me?http://share.framerjs.com/gzy6onpyb1pa/
Chris Camargo Anton Jarl nevermind - figured it out. Thanks for the help1!!!!!
Anton Jarl Here's the solution I came up with