The fill function that I made works as long as you only need one color. How do I make a variable that will store the color? flash keeps giving me an error for trying to do it the way I am doing it.
fillit = function (d, e, f, g, color) {
color2 = "0x"+color
_root.lineStyle(1, 0x666666)
_root.beginFill(color2, 100)
_root.moveTo(points[d].x, points[d].y)
_root.lineTo(points[e].x, points[e].y)
_root.lineTo(points[f].x, points[f].y)
_root.lineTo(points[g].x, points[g].y)
_root.lineTo(points[d].x, points[d].y)
_root.endFill()
}