onUpdateScope

Availability

AS2 and AS3.

Usage

... onUpdateScope:value, ...

Parameters

value:Object — The object in which the onUpdate function will be executed. This is needed if you have some specialized code inside the event function; in that case, references to this. inside the function will reference to the object defined by this parameter. If omitted, the tweened object is the scope used instead.

Examples

// Run an event on an object, and output the scope in which the event is being executed
// Output: "_level0.box", the tweened object itself
Tweener.addTween(this.box, {_x:100, time:1, onUpdate:function() { trace (this); }});
// Output: "_level0", the scope from which the tween was started
Tweener.addTween(this.box, {_y:100, time:1, onUpdate:function() { trace (this); }, onUpdateScope:this});

See also

onUpdate, onUpdateParams