Flash Drawing: Fill a drawn shape

Hey guys, I’m not familiar with the flash drawing api at all so I’ve come here

I’ve got a simple thing that allows you to draw lines. So lets say I draw a triangle or random closed shape with the mouse. How can I fill that with a color or bitmap?