2 Replies Latest reply on Oct 28, 2011 8:37 AM by oldMster

    Some random strings becoming 0 from http request




      I have been getting some very weird things happening with a token system i am using and i think i have worked out why but dont know how to fix it.


      Basically I am using tokens to make sure someone is logged in to give them access to my app.

      I log them in via a http request to a php file which then returns some xml with a token. I acess it as follows:


      xml: <token>1e1242</token>

      private function loginResult(event:ResultEvent):void


           userToken = event.result.token;



      where userToken is a String.

      I get the token from the uniqid() php function


      Sometimes the token becomes infinity or 0 in my application when i can clearly see in my network monitor that it is sending a normal token.

      I have descovered one case when this always happens is when the token begins with '1e'.

      This reads infinity and when i convert to a string returns null.


      I think it is assuming it is a different type but i have no idea how to fix it.

      I have tried using   userToken = event.result.token as String;

      but it just becomes null.


      If anyone has any ideas how to solve this or a different method to use id really apreciate it!


      Thank you in advance