Help with script for button

hello everybody.
i was following a tutorial about some buttons, where the actual button remains pressed until another one is pressed. there’s a

var activeButton:String;

in the main timeline, that keeps the name of the actual button pressed. the button is a clip inside another clip, so i write this in the first frame of the nested clip:

this.onPress=function() {
//first i change the actual button pressed to the normal state
** _parent[_parent.activeButton].gotoAndStop(“up”);**
//then change the var to the name of the actual button pressed, this:
_parent._parent.menuactivo = this._name;
//then leave the actual button pressed:
this._parent.gotoAndStop(“down”);
};
but it doesn’t work, the variable doesn’t change and the actual button doesn’t return to the normal state.why??
besides, the brackets [ ] confuse me, i looked in the flash help and it says that they evaluate an expression and return a value, or access the properties of a movieclip, however i really didn’t understand.
could anybody help me and tell me why this script doesn’t work, and what those brackets are for?? i’m really confused, i hope somebody can help me, i’d really appreciate it, thanks.

Post .fla.

sorry here’s the .fla
as i said, the line with the brackets confuses me [ ]
can someone explain, please? the buttons don’t work as they should
thanks

errr…nobody?
i was so desperate i started making (irrational,intuitive)tests and guess what: i made it work.
i changed this line:

** _parent[_parent.activeButton].gotoAndStop(“up”);

**for this one

** _parent._parent[_parent._parent.activeButton].gotoAndStop(“up”);

**the problem is I DON’T UNDERSTAND why it does work now. what do these brackets [ ] do?
can some mercy soul explain me this???
please

…anyone out there? :crying:

tumbleweed

I don’t see how hard it would be to make a button remain on a pressed position until another button is pressed

I MAY look into this…

ParanoidAndroid…

You just reached the true scope of the object. [ ] are used to reference to a clip instance.
it is a alternative to the eval command.