3 Replies Latest reply on Nov 9, 2006 7:56 PM by Thepoor13

    have some problem in Number

    Thepoor13
      my project bellow

      var Total:Number
      var Num:Number;
      loadVariablesNum("Document.txt",0);
      this.onData=function(){
      Total=Number(total);
      Num=Number(num)
      trace(Total);
      trace(Num);
      }
      out put is following:
      NaN
      10
      NaN
      5
      ??
      why this?

      another:
      var Total:Number
      var Num:Number;
      loadVariablesNum("Document.txt",0);
      this.onData=function(){
      Total=Number(total);
      Num=Number(num)
      if (isNaN(Total){
      trace(Total);
      }
      trace(Num);
      }
      }
      Output is following
      NaN
      5

      so Total and Num are not Number?
      why this?
      need help!
      my Document is following
      total=10&num=5&Munite=10