im doing a color mixing game.. i have 6 buttons.. with shows the color whn u click on the button..
how to i mix them??

btnRed.onPress = function() {
red._visible = true;

btnGreen.onPress = function() {
green._visible = true;

if (btnGreen.onPress && btnRed.onPress) {
yellow._visible = true;

red._visible = false;
blue._visible = false;
green._visible = false;
}

this coding doesn't work..
i have no idea.. how the coding should be..
please HELP me.. =D