Animation Events
Events.AnimationStart— Start animation. 译:动画开始Events.AnimationStop— Stop animation. 译:动画停止Events.AnimationEnd— End of animation. 译:动画结束
layerA = new Layer
layerA.animate
properties:
x: 100
#Returns the animation and the layer
layerA.on Events.AnimationEnd, (animation, layer) ->
print animation, layer
Animation Event Shortcuts
译:动画事件的快捷键
#For Events.AnimationStart
layerA.onAnimationStart ->
print "Animation started"
#For Events.AnimationStop
layerA.onAnimationStop ->
print "Animation stopped"
#For Events.AnimationEnd
layerA.onAnimationEnd ->
print "Animation ended"