Beginner Class

Hi,
I’m trying to wrap my head around writing .as files in MX 2004. As a practice file I made a MovieClip called SquareClip in the library of flash file. I made the linkage name SquareClip. My .as file called Square looks like this:


class Square extends MovieClip{
	
	//Variables
	
	
	//constructor
	function Square(xPos:Number,yPos:Number){
		_x = xPos;
		_y = yPos;
		drawSquare();

	}
	
	//methods
	function drawSquare(){
		attachMovie("SquareClip","mySquare",_root.getNextHighestDepth());
	}
}

In the first frame of my flash timeline I wrote:


var square1:Square = new Square(0,0);

Could anyone tell my where my logic is wrong 'cause it doesn’t work.

Thanks
Jay