In AS# you can do it easily by using the graphics object:
var mc:MovieClip = new MovieClip();
mc.graphics.lineStyle(2,0x000000); //set stroke size and
mc.graphics.beginFill(0x000000); //set fill color
mc.graphics.drawRect(100,100,200,100);// draw rectanle
mc.graphics.endFill(); //end dra
addChild(mc); //Put mc on stage.
Now you can use mc as you would any movie clip.
Hope this helps.