home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / croc.swf / scripts / DefineSprite_108 / frame_1 / DoAction.as < prev   
Encoding:
Text File  |  2003-11-08  |  340 b   |  15 lines

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