home *** CD-ROM | disk | FTP | other *** search
- gagne = 1;
- plane.plane.plane.plane.stop();
- fuelAlarma.gotoAndStop(1);
- initSpeed = vitesseScroll / 2;
- consigneDecor = - lastDecor._x - 200;
- initX = plane._x;
- initY = plane._y;
- amplitudeV = hauteurJeu - initY;
- amplitudeH = 250;
- angle = -90;
- speedAtterissage = 3;
- this.onEnterFrame = function()
- {
- var _loc1_ = this;
- scrollDecor();
- if(decor1._x < consigneDecor)
- {
- decor1._x = consigneDecor;
- }
- trace(consigneDecor);
- if(decor1._x - 300 > consigneDecor)
- {
- vitesseScroll = initSpeed;
- scrollDecor();
- plane._rotation += (- plane._rotation) / 20;
- plane.angle += (- plane.angle) / 10;
- plane._y += plane.gaz * Math.sin(plane.angle);
- plane._y = Math.min(plane._y,hauteurJeu);
- plane._y = Math.max(plane._y,50);
- }
- else
- {
- initX = plane._x;
- initY = plane._y;
- amplitudeV = hauteurJeu - plane._y;
- _loc1_.onEnterFrame = function()
- {
- vitesseScroll = initSpeed;
- scrollDecor();
- if(decor1._x < consigneDecor)
- {
- decor1._x = consigneDecor;
- }
- plane._y = (Math.sin(angle / 180 * 3.141592653589793) + 1) / 2 * amplitudeV + initY;
- plane._x = (angle + 90) / 180 * amplitudeH + initX;
- coefRot = Math.min(1,amplitudeV / 500);
- plane._rotation = Math.cos(angle / 180 * 3.141592653589793) * 50 * coefRot;
- angle += 3;
- if(angle >= 90)
- {
- play();
- this.onEnterFrame = function()
- {
- valSound = Math.max(0,motorSND.getVolume() - 1);
- motorSND.setVolume(valSound);
- plane._x += speedAtterissage;
- speedAtterissage /= 1.01;
- if(decor1._x == consigneDecor && Math.round(speedAtterissage * 10) == 0)
- {
- this.onEnterFrame = null;
- }
- };
- }
- };
- }
- };
-