8 Replies Latest reply on Jul 20, 2007 7:06 AM by Handycam

    How to get XML node to be a number

    Handycam Level 1
      In my XML file, I have an item like:


      In my Flex code, I have a variable:

      public var stockOnHand:Number;


      private function dataHandler(event:ResultEvent):void {
      stockOnHand = event.result.myxml.amountt;

      but if I try to access that variable I find it's value to be "NaN". So it's not registering as a number, must be a string. Why?