Es un poco chorras, pero bueno 
// dibujar_rectangulo
// tonilopez
// posx,poy = posición inicial en los ejes x,y
// ancho = ancho del rectangulo
// alto = alto del rectangulo
// ancho_borde
// color_borde
// alfa_borde
// color_relleno
// alfa_relleno
MovieClip.prototype.dibujar_rectangulo = function(pos_x, pos_y, ancho, alto, ancho_borde, color_borde, alfa_borde, color_relleno, alfa_relleno) {
// –
this.px = pos_x;
this.py = pos_y;
this.an = ancho;
this.al = alto;
this.ab = ancho_borde;
this.alb = alfa_borde;
this.cr = color_relleno;
this.ar = alfa_relleno;
// –
this.createEmptyMovieClip("papel", 1000);
with (papel) {
beginFill(cr, ar);
lineStyle(this.ab, this.cb, this.alb);
moveTo(px, py);
lineTo(px+an, py);
lineTo(px+an, py+al);
lineTo(px, py+al);
lineTo(px, py);
endFill();
}
};
dibujar_rectangulo(0, 0, 100, 100, 1, “0x000000″, 100, “0xCCCCCC", 100);