home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / mr_danger.swf / scripts / DefineSprite_118 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-20  |  361 b   |  10 lines

  1. this.onEnterFrame = function()
  2. {
  3.    this.dist = Math.sqrt((_root.ground._x + this._x - _root.doggy._x) * (_root.ground._x + this._x - _root.doggy._x) + (_root.ground._y + this._y - (_root.doggy._y - 17)) * (_root.ground._y + this._y - (_root.doggy._y - 17)));
  4.    if(this.dist < 30)
  5.    {
  6.       _root.score = 0;
  7.       _root.doggy.gotoAndStop(3);
  8.    }
  9. };
  10.