# Cannot use LoadVariablesNum variables outside of textboxes

**URL:** <https://forum.kirupa.com/t/cannot-use-loadvariablesnum-variables-outside-of-textboxes/304857>\
**Category:** flash\
**Created:** [February 15, 2010, 4:50pm UTC](https://forum.kirupa.com/t/cannot-use-loadvariablesnum-variables-outside-of-textboxes/304857 "2010-02-15T16:50:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![losergeek](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@losergeek](https://forum.kirupa.com/u/losergeek)\
**Post date:** [February 15, 2010, 4:50pm UTC](https://forum.kirupa.com/t/cannot-use-loadvariablesnum-variables-outside-of-textboxes/304857/1 "2010-02-15T16:50:28Z")

</div>

Does anybody know any reason why I can’t use variables loaded from a text file using loadVariablesNum anywhere but in the Var field of a text box?  
If I try this:

\*The loadVariablesNum (“textfile.txt”,0);  
\*it loads the text  
\*variable1=3.14159&variable2=cow  
\*from the text file, and if I make 2 dynamic text boxes with the Var parameter as variable1 and variable2, they’d have “3.14159” and “cow” show up in them when I run the script. So I know that the textfile is being read and the variables are being loaded.  
But if I try  
newvar1=variable1;  
newvar2=variable2;  
in my code, and then put newvar1 and newvar2 in my textbbox Var, I get nothing in them. I should be able to assign the newvar variable the same value as variable1, but I can’t.  
trace (variable1);  
should output the text “3.14159” when run, but it displays “undefined” every time.  
Every site I have been to says I should be able to access my loaded variable values simply by using variable1, or \_root.variable1, or \_level0.variable1, but none of these work any differently.

I can assign an instance name to the textbox and then assign a value to that instance name, and if I do that, assuming the instance name is “box”)  
box.text = cow;  
then I can get the textbox to display “cow”. If I try the variable  
box.text = variable1  
I get nothing.

Am I misunderstanding how this is supposed to work?  
Thanks!
