home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / redbeard.swf / scripts / DefineSprite_83 / frame_1 / DoAction.as
Encoding:
Text File  |  2008-09-12  |  962 b   |  19 lines

  1. if(getProperty("_root.BackgroundMC", _X) + _X > 0 and getProperty("_root.BackgroundMC", _X) + _X < 450 and getProperty("_root.BackgroundMC", _Y) + _Y + _height > 0 and getProperty("_root.BackgroundMC", _Y) + _Y < 300)
  2. {
  3.    if(eval("_root.codeMC:state") != "dead")
  4.    {
  5.       if(getProperty("_root.playerMC", _Y) > _Y + getProperty("_root.BackgroundMC", _Y) and getProperty("_root.playerMC", _X) > _X + getProperty("_root.backgroundMC", _X) and getProperty("_root.playerMC", _X) < _X + getProperty("_root.backgroundMC", _X) + _width)
  6.       {
  7.          if(eval("_root.CodeMC:direction") == 1)
  8.          {
  9.             setProperty("_root.playerMC", _X, _X + getProperty("_root.backgroundMC", _X) - 1);
  10.          }
  11.          if(eval("_root.CodeMC:direction") == -1)
  12.          {
  13.             setProperty("_root.playerMC", _X, _X + getProperty("_root.backgroundMC", _X) + _width + 1);
  14.          }
  15.          set("_root.CodeMC:state","Stopped");
  16.       }
  17.    }
  18. }
  19.