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

  1. myx = _X;
  2. myW = _width * 0.5;
  3. myR = myx + myw;
  4. myL = myx - myw;
  5. if(targon eq "false")
  6. {
  7.    if(myR > -10 and myL < _root.stagew + 10)
  8.    {
  9.       _visible = 1;
  10.       targon = "true";
  11.    }
  12. }
  13. else if(myL > _root.stageW + 10 or MyR < -10)
  14. {
  15.    _visible = 0;
  16.    targon = "false";
  17. }
  18. if(_root.truck1._x < myx - 25)
  19. {
  20.    if(_root.convoylist.length > 0)
  21.    {
  22.       gotoAndStop("done");
  23.       play();
  24.    }
  25. }
  26. gotoAndPlay(_currentframe - 1);
  27.