home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / multimed / falafel / falafel-king_eng.exe / scripts / frame_14 / DoAction.as
Encoding:
Text File  |  2002-07-22  |  2.6 KB  |  113 lines

  1. function showIcon(whichIcon)
  2. {
  3.    whichIcon._visible = 1;
  4.    whichIcon._x = _root._xmouse;
  5.    whichIcon._y = _root._ymouse;
  6. }
  7. function hideIcon(whichIcon)
  8. {
  9.    whichIcon._visible = 0;
  10. }
  11. function openTape()
  12. {
  13.    duchan.tape._visible = 1;
  14.    duchan.tape.tape_light._visible = 1;
  15.    duchan.tape.tape_light._visible = 1;
  16.    duchan.tape.tape_light.gotoAndPlay(2);
  17. }
  18. function activateTape()
  19. {
  20.    duchan.tape._visible = 0;
  21.    duchan.tape.tape_light._visible = 0;
  22.    _root.bg_music.gotoAndPlay("stop music");
  23.    if(flies.active == true)
  24.    {
  25.       _root.flies.gotoAndPlay("stop buzz");
  26.    }
  27.    i = 1;
  28.    while(6 >= i)
  29.    {
  30.       eval("person" add i).gotoAndPlay("music");
  31.       gotoAndPlay(31);
  32.       i++;
  33.    }
  34.    _root.musicOn = true;
  35. }
  36. function returnTape()
  37. {
  38.    gotoAndPlay(22);
  39.    if(_root.soundOn == true)
  40.    {
  41.       _root.bg_music.gotoAndPlay(1);
  42.    }
  43.    else
  44.    {
  45.       _root.soundButt.gotoAndPlay("sound off");
  46.    }
  47.    if(flies.active == true)
  48.    {
  49.       _root.flies.gotoAndPlay("loop");
  50.    }
  51.    i = 1;
  52.    while(6 >= i)
  53.    {
  54.       eval("person" add i).gotoAndPlay("normal");
  55.       resetNerves(eval("person" add i));
  56.       i++;
  57.    }
  58.    _root.musicOn = false;
  59. }
  60. function checkTapeStatus(currentSheerit)
  61. {
  62.    if(currentSheerit >= 1)
  63.    {
  64.       if(_root.lastSheerit < currentSheerit)
  65.       {
  66.          tapeSound.start();
  67.          _root.openTape();
  68.          _root.lastSheerit = currentSheerit;
  69.       }
  70.    }
  71. }
  72. function pauseGame()
  73. {
  74.    if(_root.pauseMode == false)
  75.    {
  76.       _root.pauseMode = true;
  77.       _root.flies.stop();
  78.       _root.flyOriginalTimeAtPause = _root.flyOriginalTime;
  79.       _root.charOriginalTimeAtPause = _root.charOriginalTime;
  80.       _root.bg_music.gotoAndPlay("stop music");
  81.       i = 1;
  82.       while(6 >= i)
  83.       {
  84.          set("_root.person" add i add "_originalTimeAtPause",eval("_root.person" add i add ".nerves.originalTime"));
  85.          i++;
  86.       }
  87.       gotoAndPlay(307);
  88.    }
  89.    else
  90.    {
  91.       _root.pauseMode = false;
  92.       _root.flyOriginalTime = getTimer() - _root.flyOriginalTimeAtPause;
  93.       _root.charOriginalTime = getTimer() - _root.charOriginalTimeAtPause;
  94.       if(soundOn == true)
  95.       {
  96.          _root.bg_music.gotoAndPlay("start");
  97.       }
  98.       else
  99.       {
  100.          _root.soundButt.gotoAndPlay("sound off");
  101.       }
  102.       i = 1;
  103.       while(6 >= i)
  104.       {
  105.          set("_root.person" add i add ".nerves.originalTime",getTimer() - eval("_root.person" add i add "_originalTimeAtPause"));
  106.          i++;
  107.       }
  108.       stopAllSounds();
  109.       _root.flies.play();
  110.       gotoAndPlay(22);
  111.    }
  112. }
  113.