public function tweenLetterReward(totalReward:int):void {
var prizeAr:Vector.<String> = new < String > ["str1", "str2", "str3", "str4",
"str5"];
for (var i:int = 0; i < totalReward; i++)
{
//rewardText.visible = true;
TweenLite.to(rewardText, (.5+i*1), { y:150, onComplete:function(_i:int):void {
rewardText.y = 300;
rewardText.text = prizeAr[_i];
tweenLetterReward(_i);
//rewardText.visible = false;
}, onCompleteParams:[i]});
}
}
在上面的代码中,假设我调用tweenLetterReward(3); 在onComplete函数中,我跟踪_i值。它为何变为下降或_i = 2,1,0。它应该是0,1,2。请帮忙。感谢