This content has been marked as final. Show 5 replies
you can store your instance names in an array. so, Button could store the instance name of one of your buttons. but "Button" wouldn't be a good choice for an instance name.
Hi kglad, thanks for your answer, but I don't want to have an array with each instance name. I made a generic button that I use for every section of my page, and since I use the same button all the time what I want to do is to change the text of each button, this is how I am doing it:
_level0.Button0.currenttext = TextVars;
_level0.Button1.currenttext = TextVars;
_level0.Button2.currenttext = TextVars;
But since I'm updating my old code I would like to have something like this:
_level0.Button[ i ].currenttext = TextVars[ i ];
So I dont have to update the code each time I add/remove buttons.
TextVars is an array that loads the names for each button from a PHP.
Thanks for your valuable help, that code worked very well