Changing color trouble

I have a clip in my movie that changes colors randomly every timre it is loaded.
hers the code:

MovieClip.prototype.randomColor = function() {
var r = Math.floor(Math.random()*255)+1;
var g = Math.floor(Math.random()*255)+1;
var b = Math.floor(Math.random()*255)+1;
var c = new Color(this);
c.setRGB(r << 16 | g << 8 | b);
};

The problem is there are other movieclips I need to change to the same color.
Heres the script I’m trying to do:

MovieClip.prototype.allSameColor = function() {
getcolor = myColor.getRGB(the_mc)
myColor = new Color(this);
myColor.setRGB(getcolor);
};