I'm having a little trouble creating a simple animation. I want a wide rectangular bar to morph into a circle and remain in the center. However, if I use the scaleX property, the borderRadius property does not render properly. I made a second animation (below)using the width property, which does what I want, but it doesn't collapse to the center — as is in the first animation. Thoughts?

1 Comments

Ben Rodenhäuser

Not sure why your code is not doing what you want it to do, but here's what you can add to make the second animation work: layerB.on "change:size", ->___layerB.midX = Screen.width / 2