home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / Arkanoid Flash.swf / scripts / frame_19 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  1.0 KB  |  41 lines

  1. i = "1";
  2. while(noOfC >= i)
  3. {
  4.    catch_y = getProperty("catch" add i, _Y);
  5.    catch_y += "6";
  6.    setProperty("catch" add i, _Y, catch_y);
  7.    if("390" < catch_y)
  8.    {
  9.       bat_x = getProperty("/bat", _X);
  10.       bat_left = bat_x - batWidth / "2";
  11.       bat_right = bat_x + batWidth / "2";
  12.       catch_x = getProperty("catch" add i, _X);
  13.       catch_left = catch_x - "10";
  14.       catch_right = catch_x + "10";
  15.       if(catch_left >= bat_left and bat_right >= catch_right)
  16.       {
  17.          tellTarget("/soundFX")
  18.          {
  19.             gotoAndStop("Catch");
  20.             play();
  21.          }
  22.          trace("You\'ve just got CATCH");
  23.          if(caught == "0")
  24.          {
  25.             caught = "1";
  26.             button = "2";
  27.             power_up = "catch";
  28.             call("reset_capsules");
  29.          }
  30.          removeMovieClip("catch" add i);
  31.          onscreen_C = "0";
  32.       }
  33.       else
  34.       {
  35.          removeMovieClip("catch" add i);
  36.          onscreen_C = "0";
  37.       }
  38.    }
  39.    i += "1";
  40. }
  41.