Newbie Coloring Book Problem

After taking the plunge into AS3 I am really confused about this problem. I want to use children’s coloring book pages and break them into mc’s that would respond to a click and pick up a color from a series of blocks, transforming the selected movie clip (part of the bigger object) to that color. I was able to generate random color blocks and change movie clips by instance name, but want to do it dynamically to be able to use several different images that employ the same class. My problem begins when I made a generic class to handle the click event. I was hoping to apply that class to all the children of my picture, so that they would pick up the hex color code from a textbox or global variable on the root, and allow the kid to click and color with it. When I tried to change the class of the pieces (MC’s) within my first picture, Flash wouldn’t let me. It wants a unique class name for every item in the library apparently. How can I get around this? I’ve enclosed code, which may help.

animal.as
package
{

import flash.display.;
import flash.events.
;
import flash.geom.ColorTransform;

public class animal extends MovieClip
{
public function animal()
{
this.addEventListener(MouseEvent.MOUSE_DOWN,saypiece);
}

    function saypiece(e:MouseEvent)
    {
        root["selectedMovie"]=this;
    }
    
    
}

}

c1.as for color blocks
package {

import flash.display.;
import flash.events.
;
import flash.geom.ColorTransform;

public class c1 extends MovieClip
{

var clr=null;

public function c1()
    {
    
        
         
        this.addEventListener(MouseEvent.MOUSE_DOWN,checkMouse);
    }
    
    public function set setcolor(value:ColorTransform):void
      {
        clr = value;
      } 
      
      public function get setcolor():ColorTransform
      {
          return clr;
          
      }


    
    function checkMouse(e:MouseEvent)
    {
        root["block"].transform.colorTransform = clr;
        if (root["selectedMovie"]!=null)
        root["selectedMovie"].transform.colorTransform=clr;
    }
 
      

}

}

/*
inside first frame of colorfill.fla which displays the blocks a preview block named block and the animal with the embedded movieclips.
*/

import flash.utils.*;
import flash.geom.ColorTransform;

var selectedMovie:MovieClip;

function makechart()
{

var colorchart=new Array();
var b:Number=0;
for (var a:Number=0;a<48;a++)
{
    b=a % 16;
    colorchart[a]=new c1();
    var myred:Number=Math.ceil(Math.random()*255);
    var mygreen:Number=Math.ceil(Math.random()*255);
    var myblue:Number=Math.ceil(Math.random()*255);
    var tcolor:ColorTransform=colorclip(colorchart[a],myred,mygreen,myblue);
    
        colorchart[a].x=50+b*30;
        colorchart[a].y=30+(30* Math.floor(a/16));
        //add this color to our class object for later retrieval
        addChild(colorchart[a]);
}

}

function colorclip(cl:MovieClip,nRed:Number,nGreen:Number,nBlue:Number)
{
var convert:String=nRed.toString(16)+nGreen.toString(16)+nBlue.toString(16);
convert=“0x”+convert;
var myColor:ColorTransform = cl.transform.colorTransform;
myColor.color = Number(convert);
cl.transform.colorTransform = myColor;
cl.setcolor=myColor;

}

function makeanimal()
{
var crab=new animal();
//crab.name=“salty”;
addChild(crab);
crab.x=400;
crab.y=300;
}

makechart();
makeanimal();