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

What is Framer? Join the Community
Return to index
Igor Kulemza
Posted Jan 12 - Read on Facebook

I have question. I create new layer and want this layer has a random X position (x: Utils.randomNumber(0, 500)). But i want this layer has Y position random depending on X. In example:

if x<250
...y=50
else
...y=100

Is it possible to define Y this way when i claims a new layer? I am trying this:

layer = New Layer
...x: Utils.randomNumber(0, 500)
...y: if x<250
... ...y=50
....else
...y=100

Fur sure Framer says there are errors. Can somebody help? I need to define Y just right when i creating an animation for layers that are created inside a loop.

1 Comments

Jon Arnold

Just put it in one line: if x > 250 then 50 else 100

Read the entire post on Facebook