onOverwrite

Availability

AS2 and AS3.

Usage

... onOverwrite:value, ...

Parameters

value:Function — A function that is called when tweening is overwritten. It is called once regardless of the number of properties involved on the tweening. The function scope is the target object itself.

Examples

// Applies two tweenings on a movieclip, warning when the first is overwritten (AS2)
onOvr = function() {
	trace ("A tweening has been overwritten at " + this);
};
Tweener.addTween(myMovieClip, {_x:100, time:1, onOverwrite:onOvr});
Tweener.addTween(myMovieClip, {_x:50, time:1});

Notes

The reference passed to this property is a reference to the function only. This roughly means you do not use any kind of parenthesis or parameters when passing the function you wish to call - you need to use the onOverwriteParams parameter for that. See the onStart method notes for more information and examples.

See also

onStart, onUpdate, onComplete, onOverwriteParams