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

What is Framer? Join the Community
Return to index
Pietro Schirano
Posted Jan 28 - Read on Facebook

Hey guys!

What's the best way to stop a scrolling layer at a certain point. As you can see in the video, what I'am trying to do is stopping the button on the top of the view. The button as the other elements are sublayer of a bigger transparent layer where the scroll event is applied. Right now I am animating the button trough next states but as you can see is pretty buggy and it's hard to guess the exact speed and curve of the scrolling animation. Thanks a lot guys!


Hojin Randy Lee

super cool...but I don't Framer JS kkk

Joshua Tucker

You could Utils.modulate the y value of the button with the y value of the scroll using scrollY (does the docs on the Framer page help at all?

scrollY on scrollviews and Utils.modulate are both explained in the docs.

Or you might need to switch to using drag versus scroll and modulating. Drag layers have more functionality in terms of calculating values. All of this is also explained in the Docs (let us know if this gets you what you need).

Pietro Schirano

I guess my question is more like how to stop the event bc I was already able to match the y value through an "if" Joshua Tucker

Joshua Tucker

Stop the event (Scroll) or stop the animation? To stop an animation, you can use layer.animateStop().

Pietro Schirano

I actually fix this resizing the size of the scrolling layers! Sometimes the solution is waaaay easier than you think

Read the entire post on Facebook