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.