Have you guys had success animating a layer's background color? Alternatively, is there an onUpdate event we can listen for during animations?
You can listen with layer.on Events.AnimationEnd, ->
Here's a quick example of animating background color. Click on the layer to see it animate.
Thanks for the response Andrew. The AnimationEnd event is working great, though I was wondering if there was an event broadcasted repeatedly through the length of the animation as a sloppy way to bind other properties to it. Weirdly enough I'm not able to tween the backgroundColor like in your example it's good to see it can be done, I'll keep messing with it.
Feel free to share your project and I can help you with your specific use case. Actually, you can listen to many of the specific properties during the animation like so:
layer.on "change:x", ->
Here's some stuff from the docs you can listen for:
"change:x" — New x position."change:y" — New y position."change:point" — New x or y position."change:width" — New width value."change:height" — New height value."change:size" — New width or height values."change:frame" — New x, y, width or height values."change:rotation" — New rotation value."change:borderRadius" — New borderRadius value."change:currentPage" — New currentPage layer."change:style" — New style declaration."change:html" — New html declaration."change:subLayers" — Added or removed subLayers."change:superLayer" — Added or removed superLayer.
sharing is a little tricky since I'm using a coffeescript compiler on windows, appreciate it though. I'll try these out too
Here's an example to get you started http://share.framerjs.com/o09h7ybdm6qx/
yea I've got basically that at line 116 here. still working with it https://github.com/ComcastroMax/logoTweens/blob/master/animations/AnimationDanger.coffee
I just played with layer opacity using animation delay, like this. http://share.framerjs.com/viq1d7mrcf9c/ You can try make each color a new state and change it on click.