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.