0 Replies Latest reply on Nov 13, 2006 10:15 PM by adam duston

    NetStatusEvent strangeness

    adam duston
      Dear Flash Experts,

      I'm running an actionscript 3 application which I made using Flex Builder. I have the following method:

      public static function logNetStatusEvent(event : NetStatusEvent) : void {
      var retVal : String = "NetStatusEvent - ";
      var info : Object = event.info;
      for (var p : String in info)
      retVal += (p + " ");
      }

      Seems pretty harmless, right? When I call NetConnection#connect, this method gets hit twice. the first time the event object is perfectly fine. When I inspect the variable it looks like a NetStatusEvent object. The second time the method is run, the event object has no properties whatsoever. When I am running in debug mode, the second line of this method will crash the browser. If I am running in the Flash Player, the second line of this method (ostensibly) will crash the Flash player. I actually have a picture of the variables inspection section of my Eclipse editor in case nobody believes me about the NetStatusEvent having no properties.

      Has anyone ever encountered this behavior? It is upsetting because I would like to log NetStatusEvents.

      Thanks very much,
      Adam