Edit fill color of manually created shape

Say I draw a square on the stage, with a fill of blue and a stroke of black. My width and height are both the same. Now, in my Actionscript, I want to change that blue fill to something else… on some off the wall condition of course.

Better yet, imagine I draw this extremly elaborate polygon out. How could I change it’s fill, dynamically, in Actionscript (AS2 preferably, but I’m just lookin’ for logic here)

Thank you.