5 Replies Latest reply on Feb 15, 2009 7:34 AM by kglad

    Convert load variables to numbers

    deliris Level 1
      I have an external file named config.txt that has the following content:


      The variable is a number i want to use to config the flash movie.

      Because all variables are loaded as String, i'm using the following code to convert the load variables to Number:

      var thumbAlpha:Number = parseInt(thumbAlphaTxt);

      The debugger says that thumbAlphaTxt='10' but thumbAlpha=NaN

      It seems thumbAlphaTxt is undefined.

      Anyone knows what the heck is happening here?

      Anyone has ever loaded variables to use them as Numbers?

      Thank you all and best regards.

      Nuno Santiago