cas
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by cas
-
-
I just double-checked, I'm using v12.1
-
Hi Carl,
The syntax error was me typing the code out by hand!!!
The code I'm using is actually part of a complex application which is using XML/JSON to build dynamic animation sequences and inject them into a single timeline in a for loop, giving me a series of animations that I can navigate between. As I add each sequence, I'm adding up the total time myself and storing it in a var called currDuration. That's why I'm using the delay parameter. This works great by the way. The only issue I have had is that when I run 2 objects with a delay, calling tl.gotoAndStop doesn't change anything back, but if I only use one, it works great which is why I thought it might be a bug. So
var currDuration:Number = 0;
var tl = new TimelineLite();
tl.insert(TweenMax.to(obj1, 1, {x:100, y:100}), currDuration);
tl.insert(TweenMax.to(obj2, 1, {x:200, y:200, delay:1}), currDuration);works when I call tl.gotoAndStop(0); but
var currDuration:Number = 0;
var tl = new TimelineLite();
tl.insert(TweenMax.to(obj1, 1, {x:100, y:100}), currDuration);tl.insert(TweenMax.to(obj1, 1, {x:150, y:150, delay:1}), currDuration);
tl.insert(TweenMax.to(obj2, 1, {x:200, y:200, delay:1}), currDuration);doesn't. I should definitely look at v12 though.
Thanks for taking the time to respond.
-
Hi,
I'm trying to run a sequence with multiple objects using a single TimelineMax instance, then moving between different labels on the timeline. Mostly this works well, but if I add another object to the sequence, with a delay, going to the specified time doesn't reset the objects properly. E.g.
tl.insert(TweenMax.to(obj1, 1, {x:100, y:100}), 0);
tl.insert(TweenMax.to(obj1, 1, {x:200, y:100, delay:1}), 0);
//At this point tl.gotoAndStop(0) will reset the animation fine.
if I add a tween of another object to the timeline, which has a delay also, then tl.gotoAndStop(0) doesn't work.
E.g.
tl.insert(TweenMax.to(obj2, 1, {x:200, y:200, delay:1}, 0));
Without the delay parameter, the timeline will reset itself fine if I call tl.gotoAndStop(0). Is there a bug in TimelineMax, or have I done something wrong?
TimelineMax sequence
in GSAP (Flash)
Posted
Hi Carl,
Thanks for looking. Gotta admit I'm on here in desperation as it's been driving me nuts for a week. I rebuild a SWF just as you did, and no issue. I think it may be an unreported error somewhere else in the code.
Cheers
Chris