I'm trying to assign the textfile to load through a variable instead of hardcoded. and I'm not sure what I'm missing.
understand I basically created a test harness in order to test the concept, I have the data loading from a flashvar normally.
text1.text = "michael080900.txt";
text3.text = '"' + text1.text + '"';
if I put "michael080900.txt" in the my_data.load() the code works perfectly. everything I want to happen does.
however, I'm not sure what I'm missing when I attempt to load it through a variable. any insight would be truly appreciated.
Is what you are calling a variable actually a textfield? If so, you should make sure that it (they) is set to be a single line textfield rather than multiline. Also, text3.text = text1.text should be sufficient, no need for the extra quotes.
Thanks for the reply, it led me to the answer.
I had a piece of example code that I followed that had this line in it.
which led me to believe that if I wanted to load a textfile that was dynamically named and generated externally, that I needed to provide that name through a variable, and would need the quotes.
<param name=FlashVars value="myVariable=Michael011852.txt&mySecondVariable=0.30000" />
so I was attempting to add "quotes" around my flashvar data , but, that is what I get for thinking.
Apparently all I had to do the whole time was this in order to get it to work.
go figure. doh!
Europe, Middle East and Africa