Button problem

I made a row of buttons in flash… the meaning is that when I click on a button that button stays highlighted.
So I mad an mc (MC_inl) with inthere a button that stays highlighted.

in my row I put the following

on (release) {
getURL(“home_nl_inh.htm”, “HomeNlMainFrame”);
_root.pagina = “1”;
if (_root.pagina==1) {
MC_inl._visible=true;
MC_inl._x=143.9;
MC_inl._y=29.5;
} else {
MC_inl._visible=false;
}
}

but it doesn’t work
what am I doing wrong??

try adding…
_root.MC_inl._visible=true;
before all mc names

/sput

sorry does not work…

:hangover:

Maybe I’m missing something…

Why dont you just change the color of the button onRelease?

When you click on one button, it resets the color of all other buttons and changes THAT button to the desired, highlighted, color.

Isn’t that what you’re trying to accomplish?

post the fla.

/sput

when I give the button an other collor onrelease, and I click on an other button… the previous button I clicked stays highlighted in that collor… thats not what I want

thx for trying

since you didnt post your fla, I’ll give you the basics, this is a simple way of doing it. You could go and do prototypes and functions and such, but I find that if you’re learning, this is a good way to practice your logic.

When you sit down to do your script, just sound it out in plain english. Write it down… kind of like this:

This is what I want:

All my buttons are blue.

When I click on one of the buttons

I want my blue button to turn light blue (highlight).

When I click on a different button,

I want all buttons to return to dark blue

and have the new button turn light blue.

…take those words and think out your script.

onRelease(){ when I click on one of the buttons

you can swap colors or change the rgb.

you will need button states or you will need to change each button. For example,

(oh, Im not going to give you actual code, since you made it hard on me :slight_smile: )

onRelease(){
this.button.color=highlight
button1.color=normal
button2.color=normal
button4.color=normal.

if you click on button 1,

onRelease(){
this.button.color=highlight
button2.color=normal
button3.color=normal
button4.color=normal

etc…

give that shot!