home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / 5Miles2Go.swf / scripts / DefineSprite_231 / frame_48 / DoAction.as
Encoding:
Text File  |  2001-07-07  |  737 b   |  20 lines

  1. CountCars = "1";
  2. while("5" >= CountCars)
  3. {
  4.    CarNum = "/car" add CountCars;
  5.    if((getProperty(CarNum, _X) + getProperty(CarNum, _width) / "2" < _X - _width / "2" - "2" or _X + _width / "2" + "2" < getProperty(CarNum, _X) - getProperty(CarNum, _width) / "2" or _Y + _height / "2" + "3" < getProperty(CarNum, _Y) - getProperty(CarNum, _height) / "2" or getProperty(CarNum, _Y) + getProperty(CarNum, _height) / "2" < _Y) and "390" >= _Y + "2")
  6.    {
  7.       set("Free" add CountCars,"1");
  8.    }
  9.    else
  10.    {
  11.       set("Free" add CountCars,"0");
  12.    }
  13.    CountCars += "1";
  14. }
  15. set("Free" add _name.substr("4","2"),"1");
  16. if(Free1 == "1" and Free2 == "1" and Free3 == "1" and Free4 == "1" and Free5 == "1")
  17. {
  18.    _Y = _Y + "1";
  19. }
  20.