新抽奖程序

private function loopNames(e:TimerEvent):void {
   for (var i:int = 0; i < sumOfWinners; i++){
    var randomIndex:int = Math.floor(Math.random() * GobalData.ary_currentIds.length);
    var currentId:int = GobalData.ary_currentIds[randomIndex];
    ary_randomIds[i] = currentId;

    (ary_winners[i] as WinnerItem).setData(GobalData.guestsXml.guest.(@id == currentId).@name);

    GobalData.ary_currentIds.slice(randomIndex, randomIndex + 1);

    if (i == sumOfWinners - 1){
     //GobalData.ary_currentIds = GobalData.ary_originalIds;
    }
   }
  }

posted @ 2010-11-29 20:38  LT世纪  阅读(309)  评论(0编辑  收藏  举报