home *** CD-ROM | disk | FTP | other *** search
- if(_root.inici == 1)
- {
- setProperty(Nau, _Y, 400);
- setProperty(Nau, _rotation, 0);
- nau_activada = 0;
- _root.inici = 0;
- vy = 0;
- vx = 0;
- }
- if(Key.isDown(Key.UP) and 0 < _root.fuel and _root.fi == 0)
- {
- _root.foc = 1;
- fuel_mascara._x -= 1;
- _root.fuel -= 0.25;
- if(3000 < score)
- {
- _root.fuel -= 0.05;
- }
- if(90 >= nau._rotation and nau._rotation >= -90)
- {
- vy -= 1 + int(nau._rotation / 90);
- }
- else
- {
- vy += 1 - int(nau._rotation / 90);
- }
- vx += nau._rotation / 90;
- }
- else
- {
- _root.foc = 0;
- }
- if(350 < nau._Y)
- {
- _root.activa = 1;
- }
- else
- {
- _root.activa = 0;
- nau_activada = 1;
- }
- if(295 < nau._Y)
- {
- _root.activat = 1;
- }
- else
- {
- _root.activat = 0;
- }
- if(Key.isDown(Key.LEFT) and 395 >= nau._y and 0 < _root.fuel)
- {
- setProperty(Nau, _rotation, nau._rotation - 2);
- _root.fuel -= 0.05;
- _root.fumdreta = 1;
- }
- else
- {
- _root.fumdreta = 0;
- }
- if(Key.isDown(Key.RIGHT) and 395 >= nau._y and 0 < _root.fuel)
- {
- setProperty(Nau, _rotation, nau._rotation + 2);
- _root.fuel -= 0.05;
- _root.fumesquerra = 1;
- }
- else
- {
- _root.fumesquerra = 0;
- }
- setProperty(smoke, _X, nau._x + 40 - nau._rotation);
- if(nau._rotation >= 50)
- {
- setProperty(nau, _rotation, nau._rotation - 1);
- }
- if(-50 >= nau._rotation)
- {
- setProperty(nau, _rotation, nau._rotation + 1);
- }
- if(nau._y >= 395 and (5 < nau._rotation or nau._rotation < -5 or 20 < vy))
- {
- ferralla._x = nau._x;
- _root.explosio = 1;
- _root.fuel = 0;
- _root.score = 0;
- if(nau._rotation < 0)
- {
- setProperty(nau, _rotation, nau._rotation + 1);
- }
- if(0 < nau._rotation)
- {
- setProperty(nau, _rotation, nau._rotation - 1);
- }
- }
- if(nau._x - 10 < fueloil._x and fueloil._x < nau._x + 10 and nau._y - 10 < fueloil._y and fueloil._y < nau._y + 10)
- {
- _root.fuel += 25;
- _root.textA = 1;
- setProperty(Text1, _X, nau._x);
- setProperty(Text1, _Y, nau._y + 10);
- if(100 < _root.fuel)
- {
- _root.fuel = 100;
- }
- _root.fuelup = 0;
- setProperty(fueloil, _visible, false);
- fueloil._x = 50 + random(450);
- fueloil._y = 50 + random(300);
- setProperty(fum_fuel, _X, fueloil._x);
- }
- if(nau._x - 30 < fueloil._x and fueloil._x < nau._x + 30)
- {
- if(nau._y - 30 < fueloil._y and fueloil._y < nau._y + 30)
- {
- _root.fuelaprop = 1;
- }
- }
- if(fueloil._x < nau._x - 30 or nau._x + 30 < fueloil._x)
- {
- if(fueloil._y < nau._y - 30 or nau._y + 30 < fueloil._y)
- {
- _root.fuelaprop = 0;
- }
- }
- if(230 >= nau._y)
- {
- _root.scoring = 1;
- _root.score += 1;
- }
- else
- {
- _root.scoring = 0;
- }
- if(nau._y == 400 and nau_activada == 1)
- {
- if(nau._x < 350 and 250 < nau._x and _root.explosio != 1 and _root.fi == 0)
- {
- _root.score += 200;
- _root.textB = 1;
- setProperty(Text2, _X, nau._x);
- setProperty(Text2, _Y, nau._y + 10);
- }
- _root.fi = 1;
- }
-