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

What is Framer? Join the Community
Return to index
Anton Kartashov
Posted Jun 08 - Read on Facebook

Just getting started with Framer JS. My first prototype was about scroll:

>timelineLayer = new Layer({width:640, height:1156, image:"images/timeline.png"})
>timelineLayer.scroll = true

>barLayer = new Layer({width:640, height:128, x:0, y:0, image:"images/bar.png"})
>barLayer.scroll = false

It's not working! I can't scroll anything. Can you help noob to figure out problem?

3 Comments

Min-Sang Choi

good to see you here Anton! try adding an extra layer to make it scrollable. like timelineScroll = new Layer

Min-Sang Choi

and add timelineLayer as sublayer. and give scroll attribute to new Layer that you just created. and it'll scroll. whole code might be like this:

timelineScroll = new Layer {x:0, y:0, width:640, height:960}
timelineScroll.addSubLayer(timelineLayer)
timlineScroll.scroll = true

Anton Kartashov

Min-Sang Choi It's working! Thanks! (Nice to meet you too :–)

Read the entire post on Facebook