home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / sneak_attack.swf / scripts / DefineSprite_120 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-20  |  482 b   |  19 lines

  1. if(_root.log._x < _parent._x && _parent._x < _root.log._x + 800)
  2. {
  3.    _parent._x = _root.log._x + 800;
  4. }
  5. if(_parent._x < -80)
  6. {
  7.    _parent._x = 1000 + random(500);
  8. }
  9. if(_root.synj._x - 150 < _parent._x && _parent._x < _root.synj._x + 150 && (_root.synj._y - 80 < _parent._y && _parent._y < _root.synj._y + 80))
  10. {
  11.    if(_root.synj.hurt != true)
  12.    {
  13.       _root.synj_hurt();
  14.       _root.synj_jump();
  15.       _root.life -= 2;
  16.    }
  17.    _parent.gotoAndStop("explode");
  18. }
  19.