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

What is Framer? Join the Community
Return to index
Wendy Lim
Posted Jun 06 - Read on Facebook

Can't seem to get this animation to trigger on click event inside this for loop. What am I missing here?

for count in [1..8]
answers = layerGroup["Answer" + count]
answers.states.add
start: {y:640, opacity:0}
answers.states.switchInstant "start"
answers.on Events.TouchStart, ->
answers.animate
properties: scale: 1
curve:"spring(200,15,0)"

2 Comments

Aalok Trivedi

You're using old syntax. Also use"this" if you want to apply the animation to every item in your loop:

This.animate
--scale: 1
--options:
----curve: spring...

Aalok Trivedi

Also for states do 'layer.states.stateName =' or

Layer.states =
--stateName:

Refer to the docs

Read the entire post on Facebook