home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / sneak_attack.swf / scripts / DefineSprite_207 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-20  |  1.6 KB  |  37 lines

  1. _parent._x += _parent.speed;
  2. if(_parent._x < -70 && _parent._name == "gnome")
  3. {
  4.    _parent._x = 1000 + random(500);
  5.    _parent.body.type.gotoAndStop(random(_parent.body.type._totalFrames) + 1);
  6.    if(random(3) == 1 && _root.gnome2._x < -70)
  7.    {
  8.       _root.gnome2._x = _root.gnome._x + 180;
  9.       _root.gnome2.gotoAndStop(1);
  10.       _root.gnome2.body.type.gotoAndStop(random(_root.gnome2.body.type._totalFrames) + 1);
  11.    }
  12. }
  13. if((_root.synj._y - 100 < _parent._y && _parent._y < _root.synj._y + 200 && _root.synj.attack_low == true || _root.synj._y - 100 < _parent._y && _parent._y < _root.synj._y + 40 && _root.synj.attack_low != true && _root.synj.attack_high != true) && (_root.synj._x < _parent._x && _parent._x < _root.synj._x + 300 && 0 < _root.synj._xscale || _parent._x < _root.synj._x && _parent._x < _root.synj._x - 300 && _root.synj._xscale < 0) && _root.synj.dodamage == true)
  14. {
  15.    if(_parent.body.type._currentFrame != 4)
  16.    {
  17.       _parent.gotoAndStop("die");
  18.    }
  19.    else
  20.    {
  21.       _parent.body.type.sparks.play();
  22.    }
  23. }
  24. if(_root.fireball._x - 50 < _parent._x && _parent._x < _root.fireball._x + 50 && (_root.fireball._y - 100 < _parent._y && _parent._y < _root.fireball._y + 100))
  25. {
  26.    _root.fireball.ball.play();
  27.    if(_parent.body.type._currentFrame != 4)
  28.    {
  29.       _parent.gotoAndStop("die");
  30.    }
  31. }
  32. if(_root.synj._x - 140 < _parent._x && _parent._x < _root.synj._x + 140 && (_root.synj._y - 80 < _parent._y && _parent._y < _root.synj._y + 80) && _root.synj.hurt != true && _parent.dodamage == true)
  33. {
  34.    _root.synj_hurt();
  35.    _root.life--;
  36. }
  37.