onStartScope

Availability

AS2 and AS3.

Usage

... onStartScope:value, ...

Parameters

value:Object — The object in which the onStart 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, onComplete:function() { trace (this); }});
// Output: "_level0", the scope from which the tween was started
Tweener.addTween(this.box, {_y:100, time:1, onComplete:function() { trace (this); }, onCompleteScope:this});

See also

onStart, onStartParams