Hi Jack,

Thank you for the explanations. I've been gradually changing to
TweenLite & TweenMax, and so far I'm very happy with it, I've achieved
good results with the filter tween and color matrix.  yoyo's really
cool too.

About that other situation, I was trying to have a time-based tween
animation, in order to have a smoother animation . I guess I
misunderstood the renderTime method. I wanted the flash player to
render the tween each 10ms. (cause with a 30fps frame rate, it would
render each 33ms, right? ) just to see what happened... the default
timing mode is frame based, right ?


Hey Isaac. What exactly are you trying to accomplish with the
renderTime(10)? Your example tween was only 1 second long, so where does the
10 come from? If you want to skip to a certain time in a TweenMax tween,
make sure you're using the latest v11 (http://blog.greensock.com/v11beta/)
and just set the currentTime property like myTween.currentTime = 10 would
make it go to the 10-second point. Or use the currentProgress property
(always between 0 and 1 where 0.5 is halfway finished) like
myTween.currentProgress = 0.5. Don’t use renderTime() - use the currentTime,
currentProgress, totalTime, or totalProgress getters/setters. The
convenience of these getters/setters is that they can easily be tweened for
advanced effects.

And there's an easier way to accomplish your repeatReverse() functionality.
Just use the yoyo and repeat features like:

var plantaTween:TweenMax = new TweenMax(planta, 1, {y:414, repeat:1,
yoyo:true, ease:Sine.easeInOut});

That'll repeat it once and since yoyo is true, it'll play forward the first
time through and backwards the second time through.

Full ASDoc documentation is at http://www.greensock.com/as/docs/tween/

Again, make sure you've got v11: http://blog.greensock.com/v11beta/. Feel
free to use the forums at http://forums.greensock.com for these types of
questions. I try to be pretty active in responding there.


PS For the record, TweenLite/Max does NOT use a Timer to drive updates. It's
ENTER_FRAME driven which is generally optimal for many reasons (I won't bore
you with an explanation here). You can have any tween base its timing on
frames instead of time if you prefer (new in v11) by setting useFrames:true.

Flashcoders mailing list

Reply via email to