Want to set something to a random colour in Macromedia Flash? Once upon a time I did, and I found this code which did the trick.
Call changeColor(<target>) to set the color of <target> to a random one
function changeColor(targ)
{
myColor = new Color(targ);
myColor.setRGB(Math.random()*0xffffff);
}