home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / croc.swf / scripts / DefineSprite_119 / frame_1 / DoAction_3.as < prev    next >
Encoding:
Text File  |  2003-11-08  |  433 b   |  19 lines

  1. function checkHeroOnCroc(direction, speed)
  2. {
  3.    if(this.hitTest(_parent.hero.hitArea))
  4.    {
  5.       if(mouthOpen == 1)
  6.       {
  7.          _parent._parent.functions.killHero();
  8.       }
  9.       if(direction eq "right")
  10.       {
  11.          setProperty(_parent.hero, _X, _parent.hero._x + speed);
  12.       }
  13.       else if(direction eq "left")
  14.       {
  15.          setProperty(_parent.hero, _X, _parent.hero._x - speed);
  16.       }
  17.    }
  18. }
  19.