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

What is Framer? Join the Community
Return to index
Jesse Wilbur
Posted Jul 10 - Read on Facebook

I'm brand new at Framer, but super excited. I'm stuck on what seems to be a really basic problem: I can't access any of my sublayers when I import from slack. Basically every action just hits the parent layer and nothing beyond that. I'm using some code from an example that seems to be similarly structured, so I'm wondering if anyone can help me figure out what I'm doing wrong.

5 Comments

Balraj Chana

Hey Jesse, welcome to Framer :) To access layers inside of your sketch object, you can do this:

for name, layer of sketch
layer.on Events.Click, -> print @

To access the sublayers inside of a specific group, you can do this:

for layer, index in sketch.specificGroup.subLayers
layer.on Events.Click, -> print @

http://framerjs.com/learn/import/

Mudit Mittal

Welcome Jesse, great to see you here :)

Jesse Wilbur

Mudit Mittal yes!

Dan Clarke

Hi Jesse Wilbur! I'm fairly new too and hadn't thought of doing that, nice! I tend to access sketch imports via: sketch.layername so my on functions end up as

sketch.layername.on

Brooks Hassig

Might I suggest never importing from Sketch? Save yourself the trouble.

Read the entire post on Facebook