home *** CD-ROM | disk | FTP | other *** search
/ Champak 35 / jogo-disk-35.iso / Games / red_beard.swf / scripts / DefineSprite_163 / frame_1 / DoAction.as
Text File  |  2007-02-27  |  880b  |  25 lines

  1. if(getProperty("_root.BackgroundMC", _X) + getProperty("_parent", _X) > 0 and getProperty("_root.BackgroundMC", _X) + getProperty("_parent", _X) < 450 and getProperty("_root.BackgroundMC", _Y) + getProperty("_parent", _Y) > 0 and getProperty("_root.BackgroundMC", _Y) + getProperty("_parent", _Y) < 300)
  2. {
  3.    if(_parent.beastie.hittest(_root.playerMC))
  4.    {
  5.       set("_root.codeMC:enemyCol","on");
  6.    }
  7. }
  8. if(startup == null)
  9. {
  10.    startx = getProperty("_parent", _X) + 1;
  11.    startup = "done";
  12. }
  13. if(getProperty("_parent", _X) < startx)
  14. {
  15.    direction = eval("_parent._parent:beastieMove");
  16.    _parent.gotoAndStop(1);
  17. }
  18. distance = Number(_parent._name);
  19. if(getProperty("_parent", _X) > startx + distance)
  20. {
  21.    direction = - eval("_parent._parent:beastieMove");
  22.    _parent.gotoAndStop(2);
  23. }
  24. setProperty("_parent", _X, getProperty("_parent", _X) + direction);
  25.