# Loading variables

**URL:** <https://forum.kirupa.com/t/loading-variables/94034>\
**Category:** Uncategorized\
**Created:** [November 7, 2003, 5:56pm UTC](https://forum.kirupa.com/t/loading-variables/94034 "2003-11-07T17:56:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rave\_t](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rave\_t](https://forum.kirupa.com/u/rave_t)\
**Post date:** [November 7, 2003, 5:56pm UTC](https://forum.kirupa.com/t/loading-variables/94034/1 "2003-11-07T17:56:28Z")

</div>

Im having a big problem…

If i define a variable “temp” in the main timeline and the want to load it with a value from a text file, say data.txt which has the variable &temp =9.

How can i do that??

I want it to be an easy way to tell a movieclip how many times it should duplicate just by alter the data.txt file.

I cant get the value into the variable…  
in frame 4 i have…var temp;  
and in frame 6 i have loadVariablesNum("./texter/data.txt", 0) but when i use trace(temp) it says undefined and no value…the path is correct cause when i make a dynamictextbox with the variable set to temp, number 9 displays.

But i want to load it iinto the variable temp not the textbox.
