I think you're problem will be related to using getTimer() - this counts the number of milliseconds from the point the flash movie started running, but resetting your animation will not reset this value
what you want to do is use a millisecond (or second) value taken from a global variable that is reset when your animation is reset. something like: var time:Number = getTimer(); skinAnimation.update(start + ((time - getTimer()) / 1000)-start % length); hth! Rob On Tue, Sep 29, 2009 at 2:20 PM, Douglas <[email protected]>wrote: > > Hi guys > > Using the code available here (http://away3d.googlecode.com/svn/trunk/ > fp9/Examples/Collada/src/<http://away3d.googlecode.com/svn/trunk/%0Afp9/Examples/Collada/src/>) > ive made an animation apply itself to a > model succesfully, all looks cool and stuff, but the problem is i need > to reset the animation every so often, looking at the skin animation > class i know to reset the animation they use the line of code: > > time = start + (time - start) % length; > > now ive tried recreating this, but mine always seems to come in at > some random point during the animation anyone got any ideas to how i > could do this? my current attempt is: > > skinAnimation.update(start + (getTimer() / 1000)-start % length); > > thanks guys :D -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
