Esseti Posted March 19, 2010 Share Posted March 19, 2010 TweenMax.allTo([mc0, mc1, mc2], 1, {alpha:0, onStart: function() { * } }); * - is there a way to refer to the tweens target inside of allTo? Like in a addEventListener scenario, when you call: e.target Link to comment Share on other sites More sharing options...
GreenSock Posted March 19, 2010 Share Posted March 19, 2010 No, not with an allTo() and onStart, but you could use an onStartListener instead of onStart like: TweenMax.allTo([mc0, mc1, mc2], 1, {alpha:0, onStartListener:myListener }); function myListener(event:TweenEvent):void { trace("started tween of " + event.target.target); } If you were doing a regular to() call and wanted a callback, it'd be as simple as: TweenMax.to(mc, 1, {alpha:0, onStart:myFunction, onStartParams:[mc]}); function myFunction(clip:DisplayObject):void { trace("started tween of " + clip); } So if you want a callback instead of a listener, you could just do your own loop through your array and create each tween instead of using an allTo(). Link to comment Share on other sites More sharing options...
Esseti Posted March 19, 2010 Author Share Posted March 19, 2010 Great, thank you for the help! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now