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

What is Framer? Join the Community
Return to index
Joshua Tucker
Posted Feb 11 - Read on Facebook

Hello all! Is there any way to change an animation's properties after declaration? I have tried all sorts of reading and wizardry without luck!

Say:

animation1 = new Animation ({
layer: layer
properties:
{scale: 1}
})

Later in my code, I'd like to change animation1's scale to something different.

6 Comments

George Kedenburg III

Any reason you're using animations instead of states?

Koen Bok

What are you trying to do exactly?

Joshua Tucker

Not particularly. My canvas has 40+ animating elements at once so I have resorted to declaring animations inside the functions. I could probably use states :P.

Joshua Tucker

Koen Bok As it says in my comment: the scale of animation1 is 1, for example. I want to change the scale of animation1 to say .5 and then call that animation again.

Koen Bok

Why do you want to re-use the specific animation? You can just make a new one, or even write a little helper function that only takes scale.

Joshua Tucker

Koen Bok True. I'll just do that for now. Thanks both of you!

Read the entire post on Facebook