Generic code for multiple MC's

Hello,

I have a flash 8 doc with two MC’s (red1 and red2) and two frames.

In frame 1, the user can select one of the MC’s, and in frame 2, he can move ONLY that MC.

Is there a way to write a general code in frame 2 and not having to write an “IF” depending an extra variable I had to create?
Because in the future I will have lots of MC’s.

Here is the little code I have and the link with the .fla at the end.

Frame 1

stop();

extra_var = 0;

red1.onRelease = function() {
extra_var = 1;
(new Color(red1)).setRGB(0xFF6666);
_root.gotoAndStop(2);
};

red2.onRelease = function() {
extra_var = 2;
(new Color(red2)).setRGB(0xFF6666);
_root.gotoAndStop(2);
};

Frame 2

stop();

delete red1.onRelease;
delete red2.onRelease;

if (extra_var == 1) {
red1.onPress = function() {
startDrag(red1, true);
};
red1.onRelease = function() {
red1.stopDrag();
(new Color(red1)).setRGB(0xFF0000);
delete red1.onPress;
delete red1.onRelease;
_root.gotoAndStop(1);
};
};

if (extra_var == 2) {
red2.onPress = function() {
startDrag(red2, true);
};
red2.onRelease = function() {
red2.stopDrag();
(new Color(red2)).setRGB(0xFF0000);
delete red2.onPress;
delete red2.onRelease;
_root.gotoAndStop(1);
};
};

http://www.sendspace.com/file/3fc6yo

I really need to solve this.
Thanks.