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

What is Framer? Join the Community
Return to index
Wendy Lim
Posted Mar 30 - Read on Facebook

I am brand new to Framer.js Just downloaded it today. I'd like to show an advert scrolling down the page, when user scrolls past a certain point. I think it would be a conditional statement and y property, but am struggling to pull it together. Are there some existing examples that would help with this?

7 Comments

Joey Lamelas

Can't think of any examples online at the moment, but what you can do is use layer.on Events.Scroll and when scrollX/Y is past a certain point, create a layer with the ad on it. Let me know if that works!

Marc Krenn

Do you mean "scrolling" as in "mouse wheel scrolling" on a desktop PC or scrolling via dragging on a touchscreen device?

Wendy Lim

Hi both, yes it's scrolling on a desktop browser, but assume the logic should be the same if I want to replicate for ipad later with a events.drag?

@Joey That sounds exactly like what I'm looking for, but its the "when" logic bit that I'm not sure where to start with. Any examples just of that syntax I could use as a starting point.

Guus Baggermans

If you're using a scrolling container, this should get you started.

Marc Krenn

http://share.framerjs.com/1s7u6o52f51r/ nice timing ;)
Edit: fixed drag direction

Guus Baggermans

The boolean function is there to prevent the animation from being triggered over and over.

Wendy Lim

You guys are amazing! Thank you both. Have got it working! You are spoiling me big time. If support is always this quick from community I'm definitely going framer all the way

Read the entire post on Facebook