Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Series of animations won't start over with first animation when stopped

Hello all,
I've got 5 animations and each fire on completion of the previous animation.

I have a 'start' button that fires animation #1 and they go from there. I can stop the animations at any point but when i push the 'start' button again it picks up where it left off and doesn't start over with animation #1.

I've checked the kitchen sink docs and can't seem to find anything helpful.

Any ideas? Thx!

— asked May 25th 2010 by Kelly Redd
  • animation

3 Answers

  • According to the docs, if you call a 'stop()' rather than a pause() on the image view, it will reset the image index to 0 again.


    How are you determining that the first animation has ended?

    — answered May 26th 2010 by Kosso
  • Thanks Kosso, I am using .stop(). i've got it to the point now where it does start the first animation over again but still continues where it left off as previously stated.

    I know when they stop b/c each animation has an eventListener that listens for it's completion and then fires the next animation.

    Here's a chunk of animation code: git://gist.github.com/414474.git

    Concerning the imageView animation link you posted, i'm not animating images.

    — answered May 26th 2010 by Kelly Redd
  • So I've yet to figure this out but have more specifics as to what is going on…

    The animations DO start over with the first animation but the previous animation continues. So if I stop on animation #2, then press the play button again animation #1 DOES fire(start over), but so does animation #3.

    Even though I'm telling the animations to .stop() it seems like it's registering as a 'complete' and causing the next animations event listener to fire when I push play again.

    Is this just the way the animations are supposed to behave?

    — answered June 1st 2010 by Kelly Redd
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.