Actionscript Draw Box
function draw_box(w,h,c){ var new_box = this.createEmptyMovieClip("new_box", this.getNextDepth()); new_box.beginFill(c); new_box.lineStyle(0,0x000000,0); new_box.moveTo(0, 0); new_box.lineTo(w, 0); new_box.lineTo(w, h); new_box.lineTo(0, h); new_box.lineTo(0, 0); new_box.endFill(); return new_box; }
Sample function call draws a 200w x 25h pixel, black box:
draw_box(200,25,0x000000);