home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / drifting.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2005-08-23  |  938 b   |  39 lines

  1. function convertNumberDisplay(param_number)
  2. {
  3.    if(param_number < 0)
  4.    {
  5.       number_str = String(param_number * -1);
  6.    }
  7.    else
  8.    {
  9.       number_str = String(param_number);
  10.    }
  11.    convertedNumber_str = "";
  12.    commaCount = 0;
  13.    var _loc1_ = number_str.length - 1;
  14.    while(_loc1_ >= 0)
  15.    {
  16.       commaCount++;
  17.       if(commaCount % 3 == 0 and _loc1_ > 0)
  18.       {
  19.          convertedNumber_str = "," + number_str.charAt(_loc1_) + convertedNumber_str;
  20.       }
  21.       else
  22.       {
  23.          convertedNumber_str = number_str.charAt(_loc1_) + convertedNumber_str;
  24.       }
  25.       _loc1_ = _loc1_ - 1;
  26.    }
  27.    if(param_number < 0)
  28.    {
  29.       convertedNumber_str = "-" + convertedNumber_str;
  30.    }
  31.    return convertedNumber_str;
  32. }
  33. function bonusPoints(param_points)
  34. {
  35.    _root.score += param_points;
  36.    _root.game_mc.bonus_points_mc.bonusPoints = param_points;
  37.    _root.game_mc.bonus_points_mc.play();
  38. }
  39.