home *** CD-ROM | disk | FTP | other *** search
/ PCNet 2003 October / PCNET_CD_2003_10_1.iso / surpriz / bubblewrap.swf / scripts / frame_5 / DoAction.as
Encoding:
Text File  |  2003-08-19  |  1.4 KB  |  86 lines

  1. if(numpopped == 1)
  2. {
  3.    bubplural = "";
  4. }
  5. else
  6. {
  7.    bubplural = "s";
  8. }
  9. popreport = "You popped " + numpopped + " bubble" + bubplural;
  10. mintext = new String(minutes);
  11. if(mintext.charAt(0) == "0")
  12. {
  13.    mintext = mintext.slice(1);
  14. }
  15. if(mintext == "1")
  16. {
  17.    minplural = "";
  18. }
  19. else
  20. {
  21.    minplural = "s";
  22. }
  23. sectext = new String(seconds);
  24. tentext = new String(tenths);
  25. if(sectext.charAt(0) == "0")
  26. {
  27.    sectext = sectext.slice(1);
  28. }
  29. if(sectext == "1" && tentext == "0")
  30. {
  31.    secplural = "";
  32. }
  33. else
  34. {
  35.    secplural = "s";
  36. }
  37. if(mintext != "0")
  38. {
  39.    minreport = mintext + " minute" + minplural;
  40. }
  41. else
  42. {
  43.    minreport = "";
  44. }
  45. if(minreport != "")
  46. {
  47.    secreport = " and " + sectext;
  48. }
  49. else
  50. {
  51.    secreport = sectext;
  52. }
  53. if(tentext != "0")
  54. {
  55.    secreport += "." + tentext;
  56. }
  57. secreport += " second" + secplural;
  58. if(minreport == "" && tenths == "0")
  59. {
  60.    secreport += " flat";
  61. }
  62. if(sectext == "0" && tentext == "0")
  63. {
  64.    secreport = " flat";
  65. }
  66. timereport = "in " + minreport + secreport;
  67. if(minutes == 99 && seconds == 59 && tenths == 9)
  68. {
  69.    timereport = "and ran out the timer";
  70. }
  71. if(nummanic == 0)
  72. {
  73.    manicreport = "without using ";
  74. }
  75. else if(nummanic == numpopped)
  76. {
  77.    manicreport = "using ";
  78. }
  79. else
  80. {
  81.    manicreport = "with " + Math.round(100 * nummanic / numpopped) + "% use of ";
  82. }
  83. manicreport += "Manic Mode!";
  84. youpopped = popreport + "\n" + timereport + "\n" + manicreport;
  85. stop();
  86.