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

What is Framer? Join the Community
Return to index
Dan Clarke
Posted Apr 20 - Read on Facebook

Hi all. My Java/Coffeescript chops are still fairly light and I'm looking for advice.

I have created a knob that can be rotated (doing this by dragging a hidden layer which updates the knobs .rotation).

Whenever the knob has moved 45 degrees forward, I'd like it to change a state of a layer. I can do this 'hard coded' and call a method, but really I'd like to have a method that listens for a change and then causes an event i.e.

when knob moves 45 degrees from the last time it did, raise a flag
method listens for the flag to be raised (or a variable to be updated)
method switches state of layer.

not sure I explained myself too well?!

2 Comments

Jurre Houtkamp

Could you share your prototype so we can have a look?

Dan Clarke

Yeah I'll get something simple together. essentially I want what .onValueChange does for sliders, but for a standard int variable...

Read the entire post on Facebook