home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / Kung_Fu.swf / scripts / DefineSprite_513 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  340 b   |  19 lines

  1. function move()
  2. {
  3.    point = new object();
  4.    point.x = _root.Guy._x;
  5.    point.y = _root.Guy._y;
  6.    _root.bg.globalToLocal(point);
  7.    if(_parent._x < point.x)
  8.    {
  9.       _parent._xscale = 100;
  10.       _parent._x += 1;
  11.    }
  12.    if(_parent._x > point.x)
  13.    {
  14.       _parent._xscale = -100;
  15.       _parent._x -= 1;
  16.    }
  17. }
  18. move();
  19.