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

What is Framer? Join the Community
Return to index
John Lee
Posted Jan 26 - Read on Facebook

Good new year, my fine fellow Frameroos!
Could someone explain 'no such state: moveY'? Or go one step further and provide a solution for using multiple states inside a function method:

changeLayerStates = (state) ->
_for layer in moveYLayers
__layer.animate state

Thanks!

4 Comments

Radek Kyselý

Mike Johnson

Yes, radeks solution should work. To answer, you were passing in 'moveY' to the function and then performing the state animation on both arrays.

Mike Johnson

But why not just call all states "move" and simple use layer.animate "move"? I would keep it simple and if you really need separate lists then make two buttons instead, or find another way to target the layers you want to modify.

Jordan Robert Dobson

I think it's just your indentation.

Read the entire post on Facebook