Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing variables or text fields after loading them

Status
Not open for further replies.

crrrazydan

Programmer
Jul 27, 2000
34
US
Hi,

I am loading variables in from a text file, and that is working ok. My problem is I can't access in any way the variables or the text fields that I loaded in from the text file.

I have a movie clip, called BandsMenu on the root level, and in that movie clip, are 12 buttons called bandname1, in each one of those buttons is a text field called Name1. That text field is linked to a variable called bandname1.

I call loadVariables("bandinfo.txt", BandsMenu); on the first frame of BandsMenu on Layer1, and that loads the variables properly.

But I want to be able to work with or put into other variables the band names contained in Name1's bandname1.
I've tried all of the following-

nameOfTheBand = bandname1;
nameOfTheBand = bandbutton1.bandname1;
nameOfTheBand = bandbutton1.Name1.text;
nameOfTheBand = bandbutton1.Name1.bandname1;
nameOfTheBand = _root.BandsMenu.bandbutton1.Name1.text;

None of those put anything into nameOfTheBand. How can I see the variables? Thanks.

I can elaborate more if needed.
 
Hmm for some reason, using a temporary off-canvas text field works...

temp.text = bandname1;
if( temp.text == "none" )
bandbutton1._visible = false;

I was originally trying to do just this and it didnt work:

if( bandname1 == "none" )
bandbutton1._visible = false;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top