[Tweener] How to get to the Tweener target via onComplete
Mitchell Hudson
soggybag at gmail.com
Sun May 18 18:20:18 PDT 2008
I'd like to reference the target of a tween through the call to
onComplete. Is this possible?
It seems that the onCompleteParams would be one method. Does, this
provide a single parameter to the onComplete function that is an
array? For example:
Tweener.addTween( _mc, { alpha:1, time:1, onComplete:test,
onCompleteParams:[ _mc ] } );
function test( _array ) {
trace( _array[0] ); // The object that just completed the tween
}
Is the idea or am I missing something?
Or is there a better way? I keep thinking there might be a way to
access the target object of the tween.
More information about the Tweener
mailing list