Hi,
Package: GSAP 12 AS I'm trying to use the addCallback function like this:
public function Main()
{
// instantiate new TimeLineLite
tl = new TimelineMax({});
tl.append(TweenMax.from(optie_1, .5, {alpha:0, ease:Back.easeOut}));
tl.addCallback(swapOne, tl.duration);
tl.append(TweenMax.from(of, .5, {alpha:0, ease:Back.easeOut}));
tl.append(TweenMax.from(optie_2, .5, {alpha:0, ease:Back.easeOut}));
tl.append(TweenMax.from(actie, .5, {alpha:0, ease:Back.easeOut}));
}
function swapOne(){
trace ("addCallback works");
tl.appendMultiple([ TweenMax.to(beeld_1, .5, {alpha:0}),
TweenMax.to(beeld_2, .5, {x:180, alpha:1, ease:Back.easeOut})
], .2, TweenAlign.NORMAL, 1);
}
Problem is that addCallback runs after the other tweens.
I've read and watched tuts but can''t find what i'm doing wrong.
What concept am i missing?
Thanks in advance
T.