home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / FrogIT.swf / scripts / DefineSprite_192 / frame_10 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  563 b   |  25 lines

  1. obj1_x = getProperty("/frosch", _X);
  2. obj2_x = getProperty("/lkw3", _X);
  3. delta_x = obj1_x - obj2_x;
  4. obj1_y = getProperty("/frosch", _Y);
  5. obj2_y = getProperty("/lkw3", _Y);
  6. delta_y = obj1_y - obj2_y;
  7. if((radius1 + radius2) * (radius1 + radius2) >= delta_x * delta_x + delta_y * delta_y)
  8. {
  9.    fscommand("startEffect","train");
  10.    tellTarget("/frosch")
  11.    {
  12.       gotoAndStop("dead");
  13.       play();
  14.    }
  15.    tellTarget("/steuerung")
  16.    {
  17.       gotoAndStop("aus");
  18.       play();
  19.    }
  20.    tellTarget("/restzeit")
  21.    {
  22.       gotoAndPlay(1);
  23.    }
  24. }
  25.