Hi there, and thank you for these fine greensock tween engines. Can't imagine how many flash banners I've made importing that com.greensock package.
So let's cut to the chase, I've started using greensock for html-banners as well and ran through a problem.
TweenLite onComplete triggers right away.
I've searched the forums and all but didn't find anything on this.
Here's the (stripped) code that's not working:
function init()
{
TweenLite.to('#frame1', .3, {opacity: 1, delay: 0, onComplete: arrowLoop, onCompleteParams:[arrow1]})
TweenLite.from('#arrow2', .3, {opacity: 0, top:"-=10",delay: 10, onComplete: arrowLoop, onCompleteParams:[arrow2]})
}
In arrowLoop(arrow) function I logged the arrow and it traces right away the latter arrow2 twice before the arrowLoop is called for arrow1. If I comment the latter tween out then the arrowLoop works just fine.
This one works correctly:
function init()
{
TweenLite.to('#frame1', .3, {css:{opacity: 1}, delay: 0})
TweenLite.delayedCall(.5, arrowLoop, [arrow1]);
TweenLite.from('#arrow2', .3, {css:{opacity: 0, top:"-=10px"},delay: 10})
TweenLite.delayedCall(10.3, arrowLoop, [arrow2]);
}