Is there a way to specify an animation for layerA.on myScale.AnimationEnd? or perhaps Events.myScale.animationEnd?
myScale.on Events.AnimationEnd, -> layerA.animate curve: "spring(100,30,0)" properties: rotation: 180
How do you use .off to switch off the listener on myScale without creating a separate handler function? Just So that layerA does not animate every time animation is applied on myScale.
Instead of .on you could use .once
I've honestly never used .off Joshua Tucker?
Aaaah!! Thank you :)
Jordan Robert Dobson I almost never use off – once is the way to go.
Rohan K You can't use off without a handler function. The function is anonymous when there's no handler, so when you call off on it, it has no reference to original (anonymous) function.
Sure. I can get you an answer for .off I just have to look it up and I'm at lunch.
I was trying to figure out how to queue animations and trigger them in sequence. .off seemed like the only way to do it but requires creating a handler every time. I didn't know about .once but I found a module that lets you specify a timeline for multiple animations.