Jump to content
Search Community

New Tweens with onComplete function in a for loop

Mich test
Moderator Tag

Recommended Posts

Hi All,

 

i try to create multiple tweens with a for... loop (its' working fine) with a onComplete function (this one doesn't work), the "loopMe" is called but the tween reverse never applies...

In short words : i want that the 14 movies loops indefinitely :)

 

loopMe = function (myTween) {
myTween.reverse(); -> i tried also eval(myTween) 
//trace(myTween); -> shows leTween3, leTween 8...
};
for (var i = 1; i<14; i++) {
_global["leTween"+i] = new TweenMax.to(this["t"+i], 3, {_alpha:100, ease:Strong.easeIn, onComplete:loopMe, onCompleteParams:["_global.leTween"+i]}); --> i tried also  onCompleteParams:[_global["leTween"+i]]
}

 

thanks for any help !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...