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

What is Framer? Join the Community
Return to index
Alexis Morin
Posted Sep 05 - Read on Facebook

What's the best way of chaining several animations together?
I'm talking something similar to the xxxx.on 'end', -> event but several times in a row. It just seems like a generally non-elegant solution to get this working.

3 Comments

Edward Sanchez

I recently had to chain about 5 things and ended up with a real long code. I also used Utils.delay 0.5, -> when I needed the next animation to play a bit after the previous one. I don't think there's an alternative. Do you have any suggestions on how you'd make it elegant?

Stephen Crowley

something.animate
properties: (whatever)
delay: 0.3
something2.animate
properties: (whatever)
delay: 0.5

And so on. That's what I do anyway and then make them a function and set an interval if I want them to loop.

Alexis Morin

Thanks for the replies. It's kind of a shame that there's no method chaining, or a better way to do this. I also usually end up using the solution of 'delay'-ing some animations over others. Another way is to package a few animations into a function and call that. it makes code slightly more compartmentalized than if it's being done in one long column of text.

Read the entire post on Facebook