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

What is Framer? Join the Community
Return to index
Rohan K
Posted Jan 05 - Read on Facebook

[SOLVED] Sorry for still more questions!! But I'm confused by what I hope is a very simple concept.

1. what's the deal with layer name? Suppose I say layerA = new layer. Here "layerA" is not the name property, and I cannot use it as an argument for childrenWithName fn. to find the said layer. Instead one has to explicitly specify a name for the layer. Why is that? Can the "variable name" not automatically be the name property? Or why can't you use the "variable name" with the ChildrenWithName fn?

2. Looking at this the other way around: if I store the "variable name" of a layer in a string such as: myLayer = "layerA". How do I use this string as a variable so that myLayer.width is the same as layerA.width?

2 Comments

Jordan Robert Dobson

la = "layerA"
window[la] = new Layer name: la

print layerA.width
print window[la].width

That should do it.

Isaac Weinhausen

Good to see you here Rohan K!

Read the entire post on Facebook