home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / toxic_jump.swf / scripts / frame_30 / DoAction.as
Encoding:
Text File  |  2008-09-24  |  13.6 KB  |  401 lines

  1. function ┬º\x04\x05┬º()
  2. {
  3.    set("\x03",1306 % 511 * true);
  4.    return eval("\x03");
  5. }
  6. var ┬º\x01┬º = 452 + "\x04\x05"();
  7. while(true)
  8. {
  9.    if(eval("\x01") == 736)
  10.    {
  11.       set("\x01",eval("\x01") - 110);
  12.       ┬º┬ºpush(true);
  13.    }
  14.    else
  15.    {
  16.       if(eval("\x01") == 372)
  17.       {
  18.          set("\x01",eval("\x01") + 186);
  19.          ┬º┬ºpush(!ord(function ┬º\x04\x05┬º()
  20.          {
  21.             set("\x03",1306 % 511 * true);
  22.             return eval("\x03");
  23.          }));
  24.          break;
  25.       }
  26.       if(eval("\x01") == 626)
  27.       {
  28.          set("\x01",eval("\x01") - 254);
  29.          if(function ┬º\x04\x05┬º()
  30.          {
  31.             set("\x03",1306 % 511 * true);
  32.             return eval("\x03");
  33.          })
  34.          {
  35.             set("\x01",eval("\x01") + 186);
  36.          }
  37.       }
  38.       else if(eval("\x01") == 410)
  39.       {
  40.          set("\x01",eval("\x01") + 434);
  41.          if(function ┬º\x04\x05┬º()
  42.          {
  43.             set("\x03",1306 % 511 * true);
  44.             return eval("\x03");
  45.          })
  46.          {
  47.             set("\x01",eval("\x01") + 59);
  48.          }
  49.       }
  50.       else if(eval("\x01") == 503)
  51.       {
  52.          set("\x01",eval("\x01") - 93);
  53.          ┬º┬ºpush(!function ┬º\x04\x05┬º()
  54.          {
  55.             set("\x03",1306 % 511 * true);
  56.             return eval("\x03");
  57.          });
  58.       }
  59.       else if(eval("\x01") == 558)
  60.       {
  61.          set("\x01",eval("\x01") + 281);
  62.       }
  63.       else if(eval("\x01") == 919)
  64.       {
  65.          set("\x01",eval("\x01") - 80);
  66.       }
  67.       else if(eval("\x01") == 839)
  68.       {
  69.          set("\x01",eval("\x01") - 712);
  70.          ┬º┬ºpush("\x0f");
  71.          ┬º┬ºpush(1);
  72.       }
  73.       else if(eval("\x01") == 127)
  74.       {
  75.          set("\x01",eval("\x01") + 584);
  76.          var ┬º┬ºpop() = function ┬º\x04\x05┬º()
  77.          {
  78.             set("\x03",1306 % 511 * true);
  79.             return eval("\x03");
  80.          };
  81.       }
  82.       else if(eval("\x01") == 711)
  83.       {
  84.          set("\x01",eval("\x01") - 475);
  85.          ┬º┬ºpush("\x0f");
  86.       }
  87.       else if(eval("\x01") == 236)
  88.       {
  89.          set("\x01",eval("\x01") + 267);
  90.          ┬º┬ºpush(eval(function ┬º\x04\x05┬º()
  91.          {
  92.             set("\x03",1306 % 511 * true);
  93.             return eval("\x03");
  94.          }));
  95.       }
  96.       else
  97.       {
  98.          if(eval("\x01") != 844)
  99.          {
  100.             if(eval("\x01") == 903)
  101.             {
  102.                set("\x01",eval("\x01") - 902);
  103.                playAmbient(amb1);
  104.                range = 200;
  105.                pNr = 0;
  106.                score = 6;
  107.                currentPNr = 0;
  108.                p0.destX = 50;
  109.                pLevel = 100;
  110.                jumpsLeft = 25;
  111.                tloDest = tlo._x;
  112.                attachMovie("heroStarter","heroStarter",50);
  113.                attachMovie("hero","hero",300);
  114.                attachMovie("arrowMC","arrowMC",250);
  115.                woda.swapDepths(1000);
  116.                hero._visible = false;
  117.                heroStarter._x = 100;
  118.                heroStarter._y = -50;
  119.                b1._alpha = 150;
  120.                onEnterFrame = function()
  121.                {
  122.                   if(gramy == true)
  123.                   {
  124.                      if(b1._alpha >= 0)
  125.                      {
  126.                         b1._alpha -= 4;
  127.                      }
  128.                      tlo._x += Math.round((tloDest - tlo._x) * 0.2);
  129.                      hero._x = eval("p" + currentPNr)._x;
  130.                      hero._y = eval("p" + currentPNr)._y;
  131.                      arrowMC._x = hero._x;
  132.                      arrowMC._y = hero._y - 10;
  133.                      X = arrowMC._x;
  134.                      Y = arrowMC._y;
  135.                      Xm = _xmouse;
  136.                      Ym = _ymouse;
  137.                      Xdiff = Xm - X;
  138.                      Ydiff = Ym - Y;
  139.                      radAngle = Math.atan2(Ydiff,Xdiff);
  140.                      arrowMC._rotation = radAngle * 360 / 6.283185307179586;
  141.                      if(jumper._visible == true && jumper._y >= 420)
  142.                      {
  143.                         attachMovie("splashMC","splashMC",700);
  144.                         splashMC._y = 370;
  145.                         splashMC._x = jumper._x;
  146.                         gramy = false;
  147.                         jumper._y = -1000;
  148.                         splashSound.start();
  149.                      }
  150.                      if(jumper.tester2.hitTest(endPlatform))
  151.                      {
  152.                         removeAllAtaczes();
  153.                         gotoAndStop("escaped");
  154.                      }
  155.                      if(jumper.tester.hitTest(eval("p" + (pNr - 1) + ".tester")))
  156.                      {
  157.                         eval("p" + (pNr - 1)).destX = 55;
  158.                         currentPNr++;
  159.                         woda.play();
  160.                         tloDest -= 50;
  161.                         if(jumpsLeft <= 20)
  162.                         {
  163.                            ataczCoin();
  164.                         }
  165.                         hero._x = eval("p" + currentPNr)._x;
  166.                         hero._y = eval("p" + currentPNr)._y;
  167.                         hero.play();
  168.                         jumpsLeft--;
  169.                         if(jumpsLeft > 0)
  170.                         {
  171.                            ataczPlatform();
  172.                         }
  173.                         else
  174.                         {
  175.                            ataczEndPlatform();
  176.                         }
  177.                         playSound(landSound);
  178.                         jumpsLeftNapis();
  179.                         b1._alpha = 150;
  180.                         hero._visible = true;
  181.                         removeMovieClip("jumper");
  182.                      }
  183.                   }
  184.                };
  185.                onMouseDown = function()
  186.                {
  187.                   if(gramy == true)
  188.                   {
  189.                      if(arrowMC._visible == true)
  190.                      {
  191.                         hero.play();
  192.                         Mouse.show();
  193.                      }
  194.                   }
  195.                };
  196.                jump = function()
  197.                {
  198.                   eval("p" + (pNr - 2)).destX = -200;
  199.                   hero._visible = false;
  200.                   ataczJumper();
  201.                };
  202.                ataczPlatform = function()
  203.                {
  204.                   attachMovie("p","p" + pNr,pLevel + pNr);
  205.                   this["p" + pNr]._x = 800;
  206.                   if(pNr == 0)
  207.                   {
  208.                      p0.destX = 55;
  209.                   }
  210.                   else
  211.                   {
  212.                      this["p" + pNr].destX = random(250) + 250;
  213.                   }
  214.                   this["p" + pNr]._y = 320;
  215.                   this["p" + pNr].onEnterFrame = locatePlatform;
  216.                   if(jumpsLeft <= 15)
  217.                   {
  218.                      ataczRura(this["p" + pNr].destX);
  219.                   }
  220.                   pNr++;
  221.                };
  222.                ataczEndPlatform = function()
  223.                {
  224.                   pNr++;
  225.                   eval("rura" + (ruraNr - 1)).destX = -200;
  226.                   attachMovie("endPlatform","endPlatform",pLevel + pNr + 1);
  227.                   endPlatform._x = 800;
  228.                   endPlatform.destX = 400;
  229.                   endPlatform._y = 320;
  230.                   endPlatform.onEnterFrame = locatePlatform;
  231.                };
  232.                locatePlatform = function()
  233.                {
  234.                   if(gramy == true)
  235.                   {
  236.                      this._x += Math.round((this.destX - this._x) * 0.1);
  237.                      if(this._x <= -150)
  238.                      {
  239.                         removeMovieClip(this);
  240.                      }
  241.                   }
  242.                };
  243.                ataczJumper = function()
  244.                {
  245.                   attachMovie("jumper","jumper",200);
  246.                   jumper._x = hero._x;
  247.                   jumper._y = hero._y;
  248.                   sila = arrowMC._alpha / 2;
  249.                   jumper.shotxspeed = sila * Math.sin((arrowMC._rotation + 90) * 0.017453292519943295);
  250.                   jumper.shotyspeed = sila * Math.cos((arrowMC._rotation + 90) * 0.017453292519943295);
  251.                   jumper.grav = 0;
  252.                   jumper.wind = 0;
  253.                   jumper.onEnterFrame = jumperEF;
  254.                };
  255.                jumperEF = function()
  256.                {
  257.                   if(gramy == true)
  258.                   {
  259.                      if(this._visible == true)
  260.                      {
  261.                         root.scored(1);
  262.                      }
  263.                      this._x += this.shotxspeed;
  264.                      this._y -= this.shotyspeed;
  265.                      this._y += this.grav;
  266.                      this.grav += 5;
  267.                      this._x -= this.wind;
  268.                      this.wind += 0.5;
  269.                      this.diff = this.shotyspeed - this.grav;
  270.                      if(this.diff <= 0 & this._currentframe == 1)
  271.                      {
  272.                         this.gotoAndStop(2);
  273.                      }
  274.                   }
  275.                };
  276.                coinLevel = 700;
  277.                coinNr = 1;
  278.                ataczCoin = function()
  279.                {
  280.                   attachMovie("coin","coin" + coinNr,coinLevel + coinNr);
  281.                   this["coin" + coinNr]._x = 600;
  282.                   this["coin" + coinNr]._y = random(100) + 100;
  283.                   this["coin" + coinNr].onEnterFrame = coinMove;
  284.                   coinNr++;
  285.                };
  286.                coinMove = function()
  287.                {
  288.                   if(gramy == true)
  289.                   {
  290.                      this._x -= 5;
  291.                   }
  292.                   if(this._x <= -10)
  293.                   {
  294.                      removeMovieClip(this);
  295.                   }
  296.                   if(this.hitTest(root.jumper))
  297.                   {
  298.                      scored(25);
  299.                      playSound(coinSound);
  300.                      AtaczCoinDisplay(this._name);
  301.                      removeMovieClip(this);
  302.                   }
  303.                };
  304.                ruraLevel = 650;
  305.                ruraNr = 1;
  306.                ataczRura = function(num)
  307.                {
  308.                   eval("rura" + (ruraNr - 1)).destX = -200;
  309.                   attachMovie("rura","rura" + ruraNr,coinLevel + ruraNr);
  310.                   this["rura" + ruraNr]._x = 590;
  311.                   this["rura" + ruraNr]._y = 210;
  312.                   this["rura" + ruraNr].destX = (num - 55) / 2 + 55;
  313.                   this["rura" + ruraNr].onEnterFrame = ruraMove;
  314.                   ruraNr++;
  315.                };
  316.                ruraMove = function()
  317.                {
  318.                   if(gramy == true)
  319.                   {
  320.                      this._x += Math.round((this.destX - this._x) * 0.1);
  321.                      if(this._x <= -150)
  322.                      {
  323.                         removeMovieClip(this);
  324.                      }
  325.                      if(this.tester.hitTest(root.jumper.tester) && jumper.shotxspeed > 0)
  326.                      {
  327.                         this._x += 20;
  328.                         jumper.shotxspeed = -5;
  329.                         playSound(hitSound);
  330.                      }
  331.                   }
  332.                };
  333.                collectedDisplayNr = 1;
  334.                collectedDisplayLevel = 600;
  335.                AtaczCoinDisplay = function(gdzie)
  336.                {
  337.                   attachMovie("collectedDisplay","collectedDisplay" + collectedDisplayNr,collectedDisplayLevel + collectedDisplayNr);
  338.                   this["collectedDisplay" + collectedDisplayNr]._x = eval(gdzie)._x;
  339.                   this["collectedDisplay" + collectedDisplayNr]._y = eval(gdzie)._y;
  340.                   collectedDisplayNr++;
  341.                };
  342.                removeAllAtaczes = function()
  343.                {
  344.                   removeMovieClip("hero");
  345.                   removeMovieClip("woda");
  346.                   removeMovieClip("arrowMC");
  347.                   removeMovieClip("jumper");
  348.                   removeMovieClip("splashMC");
  349.                   removeMovieClip("endPlatform");
  350.                   i = 0;
  351.                   while(i < 30)
  352.                   {
  353.                      removeMovieClip("p" + i);
  354.                      removeMovieClip("coin" + i);
  355.                      removeMovieClip("rura" + i);
  356.                      i++;
  357.                   }
  358.                };
  359.                ataczPlatform();
  360.                jumpsLeftNapis = function()
  361.                {
  362.                   if(jezyk == "eng")
  363.                   {
  364.                      jumpsLeftTXT = jumpsLeft + " jump left";
  365.                   }
  366.                   else if(jezyk == "fra")
  367.                   {
  368.                      jumpsLeftTXT = "plus que " + jumpsLeft + " sauts";
  369.                   }
  370.                   else if(jezyk == "hol")
  371.                   {
  372.                      jumpsLeftTXT = "nog " + jumpsLeft + " sprongen";
  373.                   }
  374.                   else if(jezyk == "ger")
  375.                   {
  376.                      jumpsLeftTXT = jumpsLeft + " sprunge ubrig";
  377.                   }
  378.                   else if(jezyk == "esp")
  379.                   {
  380.                      jumpsLeftTXT = "quedan " + jumpsLeft + " saltos";
  381.                   }
  382.                   else if(jezyk == "pol")
  383.                   {
  384.                      jumpsLeftTXT = "zostalo " + jumpsLeft + " skokow";
  385.                   }
  386.                   b1.napis = jumpsLeftTXT;
  387.                };
  388.                jumpsLeftNapis();
  389.                break;
  390.             }
  391.             if(eval("\x01") == 1)
  392.             {
  393.                set("\x01",eval("\x01") - 1);
  394.             }
  395.             break;
  396.          }
  397.          set("\x01",eval("\x01") + 59);
  398.       }
  399.    }
  400. }
  401.