Titanium Community Questions & Answer Archive

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

animation.repeat value limits

playing with animation.repeat,
is a 0 value supposed to represent infinite repeats?
It seems to be defaulting to 1 when set as 0.
incredibly high values also seem to revert to 1
(10000000000 for example)

what are the upper and lower limits for this value?
and is there an easy way to set to infinite repeats?

iphone sdk 3.1, TI 1.0, mobile sdk 1.1.2

— asked March 27th 2010 by Jon Nielsen
  • animation
  • iphone
  • mobile
  • repeat
0 Comments

4 Answers

  • Untested workaround: Place the animation in a method, then attach an event to the animation which will call this method once the animation is complete. Then call the method once to start the loop. Removing the listener should stop the loop.

    — answered March 27th 2010 by Florian Plank
    permalink
    0 Comments
  • thanks, the suggestion is appreciated.
    Ive have already been playing with that approach, I was looking/hoping for an actual feature that I may have missed in the docs.
    This is in reference to a particle generator, so Im really testing the limits of the graphics updates more than anything else.
    (woo hoo, fun times)

    — answered March 27th 2010 by Jon Nielsen
    permalink
    0 Comments
  • Yep, I figured so. The docs are pretty incomplete and/or inaccurate IMO, so I wish good luck.

    — answered March 27th 2010 by Florian Plank
    permalink
    0 Comments
  • Simply set -1

    — answered December 10th 2012 by Sko
    permalink
    2 Comments
    • -1 not work for me

      — commented December 17th 2012 by Samuele Coppedè
    • Your SRC / Ti ? I don't have problem with that…

      — commented December 17th 2012 by Sko
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.