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

What is Framer? Join the Community
Return to index
Riley Hollobaugh
Posted Feb 24 - Read on Facebook

Question regarding The ScrollComponent created by a FlowComponent. I'm trying to make the content scroll to the top of the page when conditions are meet, but whenever I try to change an element of the ScrollComponent (example: scrollComponent.scrollY = 200) I get a "variable not found error" despite the object being in the heiarchy. The objects name is "scrollComponent". Is the object intentionally uneditable? Unfortunetly, I'm unable to share the project file.

2 Comments

Eelco Lempsink

Hi Riley, while the name of the object is ‘scrollComponent’, that does not automatically mean it’s also available as a variable. Because there’s only one Scroll Component that get’s reused for different pages, probably the best way to access it is to ‘walk’ the layer hierarchy using the variable you easily *do* have access to, namely the page, so, for example `page.parent.parent` will be the Scroll Component. See: https://framer.cloud/VimMe

Riley Hollobaugh

Thank you and good to know! Works like a charm now.

Read the entire post on Facebook