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

What is Framer? Join the Community
Return to index
Akhil Dakinedi
Posted Sep 08 - Read on Facebook

Is there a way to toggle between a layer's animation states through another layer's on-click event? For example:

I have two layers blueBox and redBox, all defined with properties and everything. I need redBox to animate between two states when blueBox is clicked. The JavaScript I have for that part:

blueBox.on(Events.Click, function(){
return"stateA", "stateB");

Is this not possible in framer.js? I have the states defined to do a simple up-and-down animation. It works if I just swap the on-click event to work on redBox (as opposed to blueBox). Is there no way to have a different layer animate by triggering an on-click event in another one?

Thanks in advance!


Jon Gold

that should work - are you getting any JS errors in the console?

Akhil Dakinedi

well it magically works now! seems like safari fixed the issue. chrome was the one being a bit buggy and glitchy. odd.

Read the entire post on Facebook