0 Replies Latest reply on Apr 24, 2007 1:04 PM by GuillaumeMalartre

    LocalConnection StatusEvent.STATUS not enough information

    GuillaumeMalartre
      Hi, I was trying something like this lately :

      //Lets say conn1, conn2, conn3 are 3 swf opened in different window and once I close them I want to get the info from a send command that failed.

      localConnection1.addEventListener(StatusEvent.STATUS,statusListener)
      var LCContainer:Object = new Object()
      LCContainer["conn1"] = true // whatever data you want I just need a reference to delete once the swf is close.
      LCContainer["conn2"] = true
      LCContainer["conn3"] = true

      //command (could be triggered by a button)
      for (var x:Object in LCContainer) {
      localConnection1.send(x.toString(),"functionTest","some value")
      }

      //--------
      function statusListener(event:StatusEvent):void {
      if (event.level == "error") {
      trace(LocalConnection(event.target))
      trace(LocalConnection(event.currentTarget))
      // I can't get any information about which call(send command) failed.
      }
      }

      //--End

      I was wondering if anyone knew how to get more information out of the statusEvent. Am I forced to extend the LocalConnection class to get the info I want?

      I would like that the statusEvent gave more then just a reference to the localConnection triggered because you can use the same LocalConnection for multiple send on different connection.