PDA

View Full Version : CLICK A BUTTON AND CHANGE THE COLOR OF THE BUTTON NAME



jl888
April 28th, 2002, 08:24 PM
Hi! All,

I've a question and think several days still can't solve it. Appreciate if somebody can help me.

There are about 20 buttons and every button has it's name. I want to click buttonA and buttonA_name change color to red. When I click another button, say buttonF, buttonF_name change color to red and the buttonA_name change color back to black.

I set button_name a MC with two layers, upper layer is black color and lower layer is red color. When I click a button I fade the upper layer and we see the color red for the button_name. When I click another button I need to fade back the button I just clicked.

It will be okay if there are just a few buttons. It might be not a good idea for many buttons because I have to set every button something like that :

on (realeas){
buttonA.buttonA_black._fade=0;
buttonB.buttonB_black._fade=1;
buttonC.buttonC_black._fade=1;
.
.
.
}

What I want is the button_name a little bit intelligent. For example, when I click btutonA, I set a variable m to 1, and then the buttonA_name change color to red and change back to black if m<>1. I tried to put the script in the button_name MC or other place but all not working. Appreciate your help....

James