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

What is Framer? Join the Community
Return to index
Luis Escobar
Posted Jul 06 - Read on Facebook

Hi guys! Still trying to figure out my pageComponent issue. I've come across some examples that use Utils.modulate, but I'm not clear on how to use it for my needs. Can someone please help?

How can I modulate the same property of a layer, unequally, from page to page in a pageComponent? For example, I'd like to accomplish something like this:
layerA.x = Utils.modulate(pageComponent.x,[0,375],[0,100],true)
and then...
layerA.x = Utils.modulate(pageComponent.x,[375,750],[100,150],true)

Can someone please help? Thanks!

3 Comments

George Otsubo

You should use page.scrollX instead of pageComponent.x. One way to modulate the same property is to check against a conditional. Something like this maybe? https://framer.cloud/iXJaZ

Luis Escobar

Thanks! I think this works well. If I want to add more states based on additional pages, how do I include "and" or "or" in conditionals in Framer?

So... >= 375 and < 750 for example

Luis Escobar

Nm, figured that out - duh! So this seems to be working, but do you have any ideas how I can simplify this approach, George Otsubo? Please check the bottom of the code.

https://framer.cloud/PlsFe

Read the entire post on Facebook