Converting Data Type Problem

So I’m importing this file called tbox.txt and in that file it has a variable, num, which equals 3. Now when I run the debug window, it comes back as num = “3”. So its a string. so I do num=num-0 to make it a number instead of a string. And it doesn’t work so I do a trace on num and it comes back as undefined… which is what I dont understand, how can it be “3” and undefined at the same time… please help…

just use Number()

newNum=Number(num);

I tried those, but the problem is still the same, its undefined so its like its not getting anything imported in the first place, all though debug says I am.

Are you sure Vars are fully loaded when tracing?


myLoadVars.onLoad = function(success){
   if(success){
      trace(Number(this.num));
   }
}