Newbie about animating a line in actionscript

hey! newbie here :h: hmm…i´m trying to start to learn actionscript. so, my idea is to just draw an animated square within i will load an image. but first off i´m trying to draw a straight line from one point to another. my probs is that i would like to control the speed the line will be drawn, first i want it to draw the x-axis quite fast, make a pause and then draw the y-axis and paus. i´m trying to use setInterval(function, speed), but it doesn´t quite work thou :upset: here´s my code:

_root.createEmptyMovieClip(“mc_clip”, 0);

function drawLine() {
//variablar
x = 0;
y = 20;

mc_clip.onEnterFrame = function() {
	mc_clip.createEmptyMovieClip("newLine", 1);
	with(newLine) {
		lineStyle(1, 0x000000, 100);
		moveTo(200, 20);
		lineTo(x++, y);
	};
};

};
this.drawLine();
setInterval(drawLine, 1000);