Wierd.... the forums said .fla is not an allowed extension...
Anyway, I attached an example for you to look at. It is for AS2 and operates in the following manner:
1) the script on the main stage frame captures whatever color the mouse is currently hovering over and saves it in hex format as the variable _root.col
2) the rainbow (color selection) object is actually a button that on release sets _root.filler to equal _root.col; essentially, the user 'clicks' a color and it saves it the hex value into another variable
3) the object whose color is being changed actually has a mask for a filler with another blank/square object being masked
4) the masked object has a code snippet that sets the contained square's color to _root.filler
So, the mouse hovers over a color, saving it as _root.col, the user clicks the button, saving _root.col as _root.filler, the object has another enclosed object being masked, the masked object changes its color to match _root.filler.
User clicks, object changes color.