home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / roam-and-protect.swf / scripts / DefineSprite_280 / frame_3 / DoAction.as
Encoding:
Text File  |  2005-09-29  |  613 b   |  23 lines

  1. ratio = 1;
  2. _X = _X + _root.movevar * ratio;
  3. myR = _X + _width * 0.5;
  4. myL = _X - _width * 0.5;
  5. if(_root.movevar > 0)
  6. {
  7.    if(myL > _root.stagew + 50)
  8.    {
  9.       _X = eval("_root." add buddy)._x - (eval("_root." add buddy)._width - _root.movevar * ratio);
  10.    }
  11. }
  12. else if(_root.movevar < 0)
  13. {
  14.    if(myR < -50)
  15.    {
  16.       trace("_root." add buddy);
  17.       undefined._x + (eval("_root." add buddy)._width + _root.movevar * ratio);
  18.       _X = eval("_root." add buddy)._x + (eval("_root." add buddy)._width + _root.movevar * ratio);
  19.       ┬º┬ºpush(undefined);
  20.    }
  21. }
  22. gotoAndPlay(_currentframe - 1);
  23.