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

What is Framer? Join the Community
Return to index
唐龍
Posted Jun 15 - Read on Facebook

Hello, I just contact framerjs 😄
This is a simple code I wrote:

layer1 = new Layer
backgroundColor:"red", borderRadius:20
layer1.center()

layer1.states.add
A:{scale:2, rotation:45}
B:{x:100, y:200, rotation:0}

layer1.states.animationOptions =
curve:"spring(200, 15, 0)"

layer1. on Events.Click, ->
layer1.states.switch("B")

When I click on the event, how can I return to the original state?
How to write code? I never learned programming.. Thank you!!

8 Comments

唐龍

I am a UI designer, I come from China, just contact framerjs, I do not have programming experience, I am not good English. Thank you.
By the way there is no question China friends? Facilitate communication and learning.😄

Fran Pérez

layer1.on Events.Click, -> layer1.states.next()

Yao Nan

a lover of Framer, but not quite experience with it, from CHINA also, say hello, friend, Long Tang

唐龍

Yao Nan 哈哈!会说中文吗?

Yao Nan

Long Tang definitely,那必须啊~

Koen Bok

欢迎来到成帧器那群家伙!

唐龍

Fran Pérez Thank you very much

唐龍

Koen Bok Haha! I am honored

Read the entire post on Facebook