# Newb variable question

**URL:** <https://forum.kirupa.com/t/newb-variable-question/176589>\
**Category:** flash\
**Created:** [January 25, 2006, 7:26am UTC](https://forum.kirupa.com/t/newb-variable-question/176589 "2006-01-25T07:26:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Counterproductive](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Counterproductive](https://forum.kirupa.com/u/Counterproductive)\
**Post date:** [January 25, 2006, 7:26am UTC](https://forum.kirupa.com/t/newb-variable-question/176589/1 "2006-01-25T07:26:31Z")

</div>

Hey,  
I’m a complete actionscript newb and I have a problem which I believe is a simple one yet it is beyond me.  
I have a text file with variables in it which are numbers. It is my understanding that they are treated as strings so I think this is at least part of my problem but basically I want to take two of those variables from the text file and add them together in flash.

Sooooo I have:

stop();  
loadVariablesNum(“textfile.txt”,0);  
variable1 = Number(variable1);  
variable2 = Number(variable2);  
variable3 = variable1 + variable2;

And I have variable3 assigned to a dynamic text field. When I run it I get “NaN” in the text field. Now I’m pretty sure that its not the text file because when I assign text fields to those variables directly I get their values so I’m thinking its something to do with either my syntax or that they are strings or im missing a command or something.  
Any help would be greatly apreciated.
