我有以下代码(精简):
public class Character extends MovieClip
{
var happiness:uint;
public Character()
{
happiness = 0;
}
private function doTheTween():void
{
TweenLite.to(this, 3, { happiness:100, onComplete:onTweenComplete } );
}
private function onTweenComplete():void
{
// do stuff
}
}
在每帧跟踪happiness
变量时,在调用补间后它保持为 0,并且onTweenComplete
永远不会调用该函数。甚至可以以这种方式使用 TweenLite 还是我错过了一些愚蠢的明显东西?