home *** CD-ROM | disk | FTP | other *** search
- width = _parent._width / 2;
- height = _parent._height / 2;
- if(_parent._y < 250)
- {
- _parent._x += _root.speed_car;
- _parent._xscale = 100;
- if(700 < _parent._x)
- {
- _parent.gotoAndStop(1 + random(3));
- _parent._x = -150;
- }
- }
- else if(250 < _parent._y)
- {
- _parent._x -= _root.speed_car;
- _parent._xscale = -100;
- if(_parent._x < -150)
- {
- _parent.gotoAndStop(1 + random(3));
- _parent._x = 700;
- }
- }
- if(_root.alien._x < _parent._x + width && _parent._x - width < _root.alien._x && (_root.alien._y < _parent._y + height && _parent._y - height < _root.alien._y))
- {
- _root.alien.gotoAndStop("die");
- }
-