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

What is Framer? Join the Community
Return to index
Chase Curry
Posted Jun 24 - Read on Facebook

Probably a simple question... I'm trying to get a sublayer in a group to animate... what's the syntax to call out a sublayer? Currently I'm doing this: parentLayerName.subLayers[3].animate.

That works until I add more sublayers into the group. Thanks!


Balraj Chana

You can either change the index number or use the subLayersByName function:

Chase Curry

I tried that, but all my functions error out

parentLayerName.subLayersByName("layerName").destroy() returns undefined, even though print parentLayerName.subLayersByName("layerName") returns an object. I must be missing something obvious

Chris Camargo

subLayersByName() returns an array. You need to address the first returned layer by using parentLayerName.subLayersByName("layerName")[0]

Chase Curry

Ah ha- knew it was something simple like that. Thanks!

Read the entire post on Facebook