home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / Its-a-Gas.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2005-11-10  |  1.3 KB  |  54 lines

  1. function fn_flapFunction()
  2. {
  3.    _root.FlapAction = false;
  4.    _root.FartAction = true;
  5.    _root.flapCount = _root.flapCount + 1;
  6. }
  7. function fn_gasLeak()
  8. {
  9.    if(_root.level == 2 && _root.gasLevel != 0)
  10.    {
  11.       _root.flapCount -= 0.1;
  12.    }
  13.    else if(_root.level == 3 && _root.gasLevel != 0)
  14.    {
  15.       _root.flapCount -= 0.2;
  16.    }
  17. }
  18. function fn_renCam()
  19. {
  20.    if(_root.FartAction == true && _root.renExpress == false)
  21.    {
  22.       labels = new Array();
  23.       labels[0] = "Pose1";
  24.       labels[1] = "Pose2";
  25.       labels[2] = "Pose3";
  26.       labels[3] = "Pose4";
  27.       labels[4] = "Pose5";
  28.       labels[5] = "Pose6";
  29.       n = labels.length;
  30.       r = int(Math.random() * n);
  31.       renCam.gotoAndPlay(labels[r]);
  32.    }
  33. }
  34. function fn_fartMeter()
  35. {
  36.    _root.gamePlay = _root.flapCount / _root.capNeed * 100;
  37.    _root.gasLevel = Math.floor(_root.gamePlay);
  38.    gasMeter.gotoAndStop(_root.gasLevel);
  39.    if(_root.gasLevel >= "100" && _root.level == 3)
  40.    {
  41.       gotoAndStop(20);
  42.    }
  43.    else if(_root.gasLevel >= "100")
  44.    {
  45.       gotoAndStop(30);
  46.    }
  47. }
  48. _root.level = 1;
  49. _root.vTime = 30;
  50. _root.flapCount = 0;
  51. _root.capNeed = 8;
  52. _root.FlapAction = false;
  53. loadVariablesNum("http://www2.warnerbros.com/tracking.html?game_id=ren_stimpy",0);
  54.