home *** CD-ROM | disk | FTP | other *** search
/ Champak 112 / jogo-disk-112.iso / Games / fish_water_challenge.swf / scripts / DefineSprite_78 / frame_40 / DoAction.as
Text File  |  2010-07-14  |  889b  |  35 lines

  1. loop = "1";
  2. collision = "0";
  3. while(mounds >= loop)
  4. {
  5.    if(getProperty("/mound" add loop, _X) < getProperty("/riff", _X) + riffwidth and getProperty("/riff", _X) < getProperty("/mound" add loop, _X) + moundwidth and getProperty("/mound" add loop, _Y) < getProperty("/riff", _Y) + riffheight and getProperty("/riff", _Y) < getProperty("/mound" add loop, _Y) + moundheight and getProperty("/riff", _currentframe) < "30")
  6.    {
  7.       collision = "1";
  8.    }
  9.    loop += "1";
  10. }
  11. if(collision == "1" and eval("/:dir") == "0")
  12. {
  13.    tellTarget("/riff")
  14.    {
  15.       gotoAndStop("jumpl");
  16.       play();
  17.    }
  18. }
  19. else if(collision == "1" and eval("/:dir") == "1")
  20. {
  21.    tellTarget("/riff")
  22.    {
  23.       gotoAndStop("jumps");
  24.       play();
  25.    }
  26. }
  27. else if(collision == "1" and eval("/:dir") == "2")
  28. {
  29.    tellTarget("/riff")
  30.    {
  31.       gotoAndStop("jumpr");
  32.       play();
  33.    }
  34. }
  35.