Filling Shape using Actionscript

How do I fill a shape with actionscript? I believe I have to put it in a movieclip. What code do I use? And also, how do I give my document the background color using actionscript?