start_mc.onRelease=function()

{

xthrust1=Number(thrust_txt.text);

sinx = 0;

ythrust1=Number(angle_txt.text);

drag=Number(drag_txt.text);

drag1=0;

plane_mc.onEnterFrame = function()

{

positionY = plane_mc._y;

positionX = plane_mc._x;

this._x += .1 *(xthrust + xthrust1);

this._y -= .1 *(ythrust + ythrust1) - ((drag * drag) /500);

ythrust = drag2;

xthrust = drag1;

drag2 = -1 * drag * Math.cos(sinx * 180 / Math.PI);

drag1 = -1 * drag * Math.cos(90 + sinx * 180 / Math.PI);

//drag = drag - 1/10;

sinx = 1/1000 + sinx;

var planeDY = positionY-previousY;

var planeDX = positionX-previousX;

var radians = Math.atan2(planeDY, planeDX);

this._rotation = radians*180/Math.PI;

previousX = positionX;

previousY = positionY;

this._rotation;

if (this.hitArea_mc.hitTest(ground_mc))

{

delete plane_mc.onEnterFrame;

this._y=ground_mc._y;

};

};

}