Hi Jack,
I just came across an issue when setting repeat or yoyo after a timeline has already played once. This is using the most recent version of the tweening classes (11.104). It appears that changing the repeat value won't interfere with calling reverse(), but it won't actually repeat no matter what you set the value to. Setting yoyo to true prevents reverse() from working at all. I've attached an example below:
package{
import flash.display.Sprite;
import com.greensock.*;
public class TweenTest extends Sprite {
protected var _ani:TimelineMax = new TimelineMax();
public function TweenTest():void {
var s:Sprite = addChild(new Sprite()) as Sprite;
s.graphics.beginFill(0xCC0000);
s.graphics.drawCircle(0,0,40);
s.x = stage.stageWidth * .5;
s.y = stage.stageHeight * .5;
_ani.insert(TweenMax.from(s, 2, { alpha:0 }));
TweenMax.delayedCall(4, changeRepeat);
}
public function changeRepeat():void {
trace("Animation should now alpha out and then alpha in again, but appears to be tired of tweening.")
_ani.repeat = 1;
_ani.yoyo = true;
_ani.reverse();
}
}
}
Any ideas? Thanks a bundle!
-Kipp