home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / ufo_comm.swf / scripts / frame_149 / DoAction.as
Encoding:
Text File  |  2007-04-25  |  8.9 KB  |  279 lines

  1. var ┬º\x01┬º = 781;
  2. while(true)
  3. {
  4.    if(eval("\x01") == 781)
  5.    {
  6.       set("\x01",eval("\x01") + 72);
  7.       ┬º┬ºpush(true);
  8.    }
  9.    else if(eval("\x01") == 431)
  10.    {
  11.       set("\x01",eval("\x01") - 260);
  12.       ┬º┬ºpush(true);
  13.    }
  14.    else
  15.    {
  16.       if(eval("\x01") == 268)
  17.       {
  18.          set("\x01",eval("\x01") + 163);
  19.          break;
  20.       }
  21.       if(eval("\x01") == 171)
  22.       {
  23.          set("\x01",eval("\x01") + 704);
  24.          if(┬º┬ºpop())
  25.          {
  26.             set("\x01",eval("\x01") - 238);
  27.          }
  28.       }
  29.       else
  30.       {
  31.          if(eval("\x01") == 637)
  32.          {
  33.             set("\x01",eval("\x01") - 616);
  34.             _root.level = 7;
  35.             _root.primaData = true;
  36.             _root.ufo.swapDepths(999);
  37.             _root.life = 100;
  38.             _root.lifeBar.gotoAndStop(_root.life);
  39.             _root.lifeText = _root.life + "%";
  40.             _root.oiRapite = 0;
  41.             _root.smokeDepth = 500;
  42.             _root.speedX = 0;
  43.             _root.speedY = 0.7;
  44.             _root.accel = 1;
  45.             _root.counterPozitii = 0;
  46.             _root.beamCounter = 0;
  47.             _root.beamOpen = false;
  48.             _root.rotation = false;
  49.             _root.float = false;
  50.             h = 1;
  51.             while(h <= 4)
  52.             {
  53.                _root.attachMovie("rosu" + h,"rosu" + h,_root.getNextHighestDepth());
  54.                _root["rosu" + h]._alpha = 0;
  55.                h++;
  56.             }
  57.             _root.onEnterFrame = function()
  58.             {
  59.                if(ok)
  60.                {
  61.                   _root.lifeText = _root.life + "%";
  62.                   _root.ufo._x += _root.speedX;
  63.                   _root.ufo._y += _root.speedY;
  64.                   _root.rotatie = _root.ufo._rotation;
  65.                   if(Key.isDown(37))
  66.                   {
  67.                      _root.rotation = false;
  68.                      if(_root.speedX > -3)
  69.                      {
  70.                         if(_root.counterPozitii == 0)
  71.                         {
  72.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatS");
  73.                         }
  74.                         _root.counterPozitii = 1;
  75.                         _root.speedX -= _root.accel;
  76.                         if(!_root.beamOpen && _root.ufo._rotation > -12)
  77.                         {
  78.                            _root.ufo._rotation -= 1;
  79.                         }
  80.                      }
  81.                   }
  82.                   if(Key.isDown(39))
  83.                   {
  84.                      _root.rotation = false;
  85.                      if(_root.speedX < 3)
  86.                      {
  87.                         if(_root.counterPozitii == 0)
  88.                         {
  89.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatD");
  90.                         }
  91.                         _root.counterPozitii = 1;
  92.                         _root.speedX += _root.accel;
  93.                         if(_root.beamOpen == false && _root.ufo._rotation < 12)
  94.                         {
  95.                            _root.ufo._rotation += 1;
  96.                         }
  97.                      }
  98.                   }
  99.                   if(Key.isDown(38))
  100.                   {
  101.                      if(_root.speedY > -3)
  102.                      {
  103.                         if(_root.counterPozitii == 0)
  104.                         {
  105.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatSus");
  106.                         }
  107.                         _root.counterPozitii = 1;
  108.                         _root.speedY -= _root.accel;
  109.                      }
  110.                   }
  111.                   if(Key.isDown(40))
  112.                   {
  113.                      if(_root.speedY < 3)
  114.                      {
  115.                         if(_root.counterPozitii == 0)
  116.                         {
  117.                            _root.ufo.ufo2.ufo3.gotoAndPlay("apasatJos");
  118.                         }
  119.                         _root.counterPozitii = 1;
  120.                         _root.speedY += _root.accel;
  121.                      }
  122.                   }
  123.                   if(Key.isDown(32))
  124.                   {
  125.                      if(_root.ufo._rotation == 0)
  126.                      {
  127.                         if(_root.beamCounter == 0)
  128.                         {
  129.                            _root.ufo.raza.gotoAndPlay(2);
  130.                            _root.beamCounter = 1;
  131.                         }
  132.                      }
  133.                   }
  134.                   if(_root.speedX < 0)
  135.                   {
  136.                      if(_root.ufo._rotation < 0 && _root.rotation == true)
  137.                      {
  138.                         _root.ufo._rotation = _root.ufo._rotation + 1;
  139.                      }
  140.                      _root.speedX += 0.2;
  141.                      if(_root.speedX >= 0)
  142.                      {
  143.                         _root.speedX = 0;
  144.                         _root.ufo.ufo2.ufo3.gotoAndStop(1);
  145.                         _root.ufo._rotation = 0;
  146.                      }
  147.                   }
  148.                   if(_root.speedX > 0)
  149.                   {
  150.                      if(_root.ufo._rotation > 0 && _root.rotation == true)
  151.                      {
  152.                         _root.ufo._rotation--;
  153.                      }
  154.                      _root.speedX -= 0.2;
  155.                      if(_root.speedX <= 0)
  156.                      {
  157.                         _root.speedX = 0;
  158.                         _root.ufo.ufo2.ufo3.gotoAndStop(1);
  159.                         _root.ufo._rotation = 0;
  160.                      }
  161.                   }
  162.                   if(_root.speedY < 0)
  163.                   {
  164.                      _root.speedY += 0.2;
  165.                      if(_root.speedY >= 0)
  166.                      {
  167.                         _root.speedY = 0.7;
  168.                      }
  169.                   }
  170.                }
  171.                else
  172.                {
  173.                   _root.ufo._y -= 5;
  174.                   _root.ufo._alpha -= 5;
  175.                }
  176.             };
  177.             if(_root.primaData)
  178.             {
  179.                _root.attachMovie("d" + _root.level,"d" + _root.level,93);
  180.             }
  181.             _root.d1._x = 405;
  182.             _root.d1._y = 257;
  183.             _root["d" + _root.level]._x = 226;
  184.             _root["d" + _root.level]._y = 303;
  185.             _root.starArray = new Array();
  186.             _root.starArray = ["s4","s4","s4","s4"];
  187.             _root.removeArray = new Array();
  188.             _root.removeArray = ["o1","o2","o3","o4","o5","o6","o7","o8","bomb1","bomb2","ufo","ufo2","poarta"];
  189.             listener = new Object();
  190.             listener.onKeyUp = function()
  191.             {
  192.                if(Key.getCode() == 37 || Key.getCode() == 38 || Key.getCode() == 39 || Key.getCode() == 40)
  193.                {
  194.                   _root.ufo.ufo2.ufo3.play();
  195.                   _root.counterPozitii = 0;
  196.                   _root.rotation = true;
  197.                }
  198.                if(Key.getCode() == 32)
  199.                {
  200.                   _root.ufo.raza.play();
  201.                }
  202.             };
  203.             Key.addListener(listener);
  204.             _root.oiCounter = 30;
  205.             _root.bombCounter = 20;
  206.             _root.smokeCounter = 3500;
  207.             _root.starCounter = 3500;
  208.             _root.oiTarget = 6;
  209.             _root.oiPeScena = 6;
  210.             _root.bombe = 2;
  211.             stop();
  212.             break;
  213.          }
  214.          if(eval("\x01") == 875)
  215.          {
  216.             set("\x01",eval("\x01") - 238);
  217.             ┬º┬ºpush(┬º┬ºpop() - 1);
  218.             break;
  219.          }
  220.          if(eval("\x01") == 812)
  221.          {
  222.             set("\x01",eval("\x01") - 749);
  223.             ┬º┬ºpush(true);
  224.          }
  225.          else if(eval("\x01") == 63)
  226.          {
  227.             set("\x01",eval("\x01") + 205);
  228.             if(┬º┬ºpop())
  229.             {
  230.                set("\x01",eval("\x01") + 163);
  231.             }
  232.          }
  233.          else
  234.          {
  235.             if(eval("\x01") == 334)
  236.             {
  237.                set("\x01",eval("\x01") + 478);
  238.                break;
  239.             }
  240.             if(eval("\x01") == 21)
  241.             {
  242.                set("\x01",eval("\x01") - 21);
  243.                break;
  244.             }
  245.             if(eval("\x01") == 853)
  246.             {
  247.                set("\x01",eval("\x01") - 312);
  248.                if(┬º┬ºpop())
  249.                {
  250.                   set("\x01",eval("\x01") - 533);
  251.                }
  252.             }
  253.             else if(eval("\x01") == 8)
  254.             {
  255.                set("\x01",eval("\x01") + 566);
  256.                ┬º┬ºpush(true);
  257.             }
  258.             else
  259.             {
  260.                if(eval("\x01") == 541)
  261.                {
  262.                   set("\x01",eval("\x01") - 533);
  263.                   break;
  264.                }
  265.                if(eval("\x01") != 574)
  266.                {
  267.                   break;
  268.                }
  269.                set("\x01",eval("\x01") - 240);
  270.                if(┬º┬ºpop())
  271.                {
  272.                   set("\x01",eval("\x01") + 478);
  273.                }
  274.             }
  275.          }
  276.       }
  277.    }
  278. }
  279.