PrimaryFeather/Starling-Framework — Issue #68: override onComplete of Tween class
Author: volzh
Created: 2012-02-27 13:14:19+00:00
State: open

if extends Tween class with overriding onComplete,
onComplete refers onComplete of extended class.

```as3
public class StarlingTween extends Tween
{
public function StarlingTween(target:Object, time:Number, transition:String="linear")
{
super(target, time, transition);
super.onComplete = this.checkComplete;
}

private function checkComplete():void
{
// this function is not called
}

public override function set onComplete(value:Function):void
{
_onComplete = value;
}

public override function get onComplete():Function
{
return _onComplete;
}
}
```

so I looked in Tween.as and tried to fix like below.
if change onComplete to mOnComplete, it works~

```as3
public function advanceTime(time:Number):void
{
......
if (mOnComplete != null && previousTime < mTotalTime && mCurrentTime >= mTotalTime)
mOnComplete.apply(null, mOnCompleteArgs);
......
}
```