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

What is Framer? Join the Community
Return to index
René Schiebelhut
Posted Feb 15 - Read on Facebook

How can i simply trigger an animation when a certain scroll point is reached?

I´ve found a few hints, but none of them fit perfectly.
I have an animation for a graph that runs before i see it. How can I trigger it to start once if scrolled down to point x


Jonas Treub

You'll have to know whether the animation already played or not. This information can be stored in a boolean variable.

animationShouldRun = true

You can check the scroll offset while the scroll component is moving with the following event:

scroll.onMove ->
if scroll.scrollY > 200
print "reached scroll offset"

René Schiebelhut

Thanks for your Answer. It gives me back an unexpected if?

Jonas Treub

Did you add tabs? Facebook removes them when pasting code snippets

Read the entire post on Facebook