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

What is Framer? Join the Community
Return to index
Adam Deher
Posted Jan 09 - Read on Facebook

Understanding states and onAnimationEnd function.

It seems when I cycled though a series of states using the onAnimationEnd function the cycle will just repeat itself if the last state has the same properties as the default state. Otherwise the cycle ends on the last state in the list of states. Is this intended?

Example File:

If you comment out state "e" and remove it from the states in the stateCycle function the animation with stop on state "d". If state "e" is included, the animation loops infinitely.

Any help for this beginner is greatly appreciated!


Eelco Lempsink

If you remove "e", the switch from state "d" to "b" will not trigger any animation and therefore not an animationEnd event. If you remove state "e" and include "a" in the cycle list, it will work:

Read the entire post on Facebook