I am trying to do a simple light-up pegboard in flash. I have finished the general logic for 1 peg but there will be a total of 2,300 pegs and I don't want to have to add an event listener to each movieclip.

Here is my code:

```
import flash.events.Event;
var my_color:ColorTransform = new ColorTransform();
movieClip_1.addEventListener(MouseEvent.MOUSE_UP, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{

    if (my_color.color == 0)
    {
        my_color.color = 0x0000FF;
        event.target.transform.colorTransform = my_color;
    }
    else if (my_color.color == 255)
    {
        my_color.color = 0x00FF00;
        event.target.transform.colorTransform = my_color;
    }
    else if (my_color.color == 65280)
    {
        my_color.color = 0xFF0000;
        event.target.transform.colorTransform = my_color;
    }
    else if (my_color.color == 16711680)
    {
        my_color.color = 0xFFFFFF;
        event.target.transform.colorTransform = my_color;
    }
    else if (my_color.color == 16777215)
    {
        my_color.color = 0x000000;
        event.target.transform.colorTransform = my_color;
    }
    else
    {
        trace(my_color.color);
    }   
}

```

[![Screenshot of Final Product]](https://i.stack.imgur.com/2lcv6.jpg)