数字动态变化

var arrNum:Array = [1,2];
    
        TweenLite.to(arrNum,1,{endArray:[100,2000], onUpdate: fillField ,onComplete:txtComplete});
            
        function fillField():void 
        {
            txt.text = Number(arrNum[0]).toFixed(0);
        }
        
        function txtComplete():void
        {
            trace(arrNum[0]);
       trace(arrNum[1]);
  }
原文地址:https://www.cnblogs.com/602147629/p/3543364.html