This Code

This code I found on the net but cant figure out how it works only some of it.

p_inc = 4;
grav = 2.5;
y = 100;
x = 50;

this.createEmptyMovieClip("cont",1);
cont.lineStyle(2,0x000000);
cont.moveTo(x,y);

_root.onMouseDown = function(){
	d = true;
};

_root.onMouseUp = function(){
	d = false;
};

_root.onEnterFrame = function(){
	power *= .65;
	if(power<0.1){
		power = 0;
	}
	if(d){
		power += p_inc;
	}
	if(y-power>20){
		y -= power;
	}
	else{
		y = 20;
	}
	if(y+grav<180){
		y += grav;
	}
};

If one of you Smart Actionscript peopl could tellm me how this code works.

Thanks.