0

I am using "onAnimationEnd" event but want to do some work when animation is progress. So I want to know current animated frame number via any progress or any event ?

Thanks for your help.

Harish Patidar
  • 303
  • 4
  • 13

1 Answers1

0

You can use the tick-event (http://www.createjs.com/Docs/EaselJS/classes/BitmapAnimation.html#event_tick) and the use the properties currentAnimation, currentAnimationFrame and/or currentFrame (http://www.createjs.com/Docs/EaselJS/classes/BitmapAnimation.html#property_currentAnimation)

Update: Sprite now dispatches a change event whenever the displayed frame changes. (by gskinner via comments)

Community
  • 1
  • 1
olsn
  • 16,644
  • 6
  • 59
  • 65
  • 1
    As a note for anyone finding this answer in the future, `Sprite` now dispatches a `change` event whenever the displayed frame changes. http://www.createjs.com/Docs/EaselJS/classes/Sprite.html#event_change – gskinner Feb 10 '15 at 16:14