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

What is Framer? Join the Community
Return to index
Albin Martinsson
Posted Jul 29 - Read on Facebook

Is it possible to target numbered PSD-layers?

In this example I can't target amount-3, do you guys know how to solve this?

shoppingTestLayers.amount-3.states.add
second: {y:100, scale:1.3}

Cheers!

5 Comments

Ale Muñoz

I think "-" is not a valid character for JS variables. Try using "_" in your layer name : )

Jon Gold

shoppingTestLayers['amount-3'] should work

Jon Gold

object.key & object['key'] are equivalent - http://eloquentjavascript.net/chapter4.html#p205e668d2c45ec08

Albin Martinsson

Thanks!

Albin Martinsson

While I'm at it I have another question. I have a background layer with cards placed vertically along it. The background layer is extending beyond the screen and is around 2000 pixels tall. When I add the

shoppingTestLayers.bg.scrollVertical = true

nothing happens.

Am I targeting the wrong layer or have I missed something completely?

Read the entire post on Facebook