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

What is Framer? Join the Community
Return to index
Florian Pnn
Posted Nov 23 - Read on Facebook

Hi guys,

I'm stuck on a coffeescript problem, I'm trying to use a variable (string) and use it as a key for a property to animate.
I don't find any work around to make this work, how can I do it?

A gist of the example I'm dealing with : https://gist.github.com/florianpnn/3f16fa1faa282021b137

3 Comments

Benjamin Den Boer

Hey Florian, this is possible, simply make sure you also pass in the value within your variable argument as well. :-) For instance, this is one way you could go about it. With this little function, you can also pass in multiple properties, like:

animateProperty(layerA, scale: 0.5, rotation: 180)

Roland Lösslein

as an alternative you can use array syntax to build a properties object you want to use as your animation destination. http://share.framerjs.com/gqeohd3yqond/

Florian Pnn

Thanks for your answers guys, it should solve my problem :)

Read the entire post on Facebook