I'm trying to help someone else and I can't figure this one out, so now I'm helping myself too
I (or this person) has a text file with a load of different variables in it. It is set up like so.
Lx1=Here is the Lx1 variable&Lx2=Here is the Lx2 variable&Lx3=Here is the Lx3 variable&Tx1=Here is the TX1 variable&Tx2=Here is the Tx2 variable&Tx3=Here is the Tx3 variable
Now I have two buttons on the stage and I want to load one of these variables at a time into my dynamic text boxes each time a button is pressed. Here is the code.
Well oldnewbie, IMHO I think its pretty shakey too
When I debug the code though, the variables T and L do go up or down each time the buttons are pressed. ie TX1, TX2, TX3 and so on and if you change these lines of code from
myText= MyVars.T;
mySlide= MyVars.L;
to
myText= MyVars.Tx1;
mySlide= MyVars.Lx1;
then the text is dragged in from the txt file, so why is it that when you place a variable at the end of the code it doesn't work? Am I supposed to use something else?
Thanks
Last edited by grooveepants; 11-20-2003 at 05:06 AM.
Well for those of you who are interested, I found the answer. I asked a guy I work with (maybe I should have done this in the first place, he's a bit of a smart bugger) and he said my code is fine. Supposedly I am referring the variable to a string or something like that? so he said all I need to do is put square brackets around the T and L like so: