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

What is Framer? Join the Community
Return to index
Ed Lea
Posted Jun 07 - Read on Facebook

I'm getting started with Framer. I'm creating new layers but having trouble adding them as sub layers. e.g.

myLayers = Framer.Importer.load("imported/some-psd")

layer = new Layer();

causes the following error:
Uncaught TypeError: undefined is not a function app.js:4
(anonymous function)

How can I add new layers and make them referenceable?


Koen Bok

Your layers are all in the "myLayers" namespace. So if you want to access a layer generated by a group called "background" you can do "myLayers.background.x = 123" for example.

Koen Bok

Also, feel free to rename myLayers to anything you like.

Ed Lea

I'm duplicating layers on the fly. I just realised I should do myLayers['Scrollables'] = new Layer; and then add sublayers to myLayers.Scrollables

Read the entire post on Facebook