1 Reply Latest reply on May 14, 2009 7:30 AM by Gregory Lafrance

    How do I write code to serve 2 events  at once?

    christoferek Level 1

      Hi All,


      I want to join 2 events and run some code (ie. a function) when they both the heades and the http data will have the valid data.


                  client.listener.onData = function(event:HttpDataEvent):void {
                    var stringData:String = event.readUTFBytes();

                    var data:ByteArray = event.bytes;


                  client.listener.onComplete = function(event:HttpResponseEvent):void {
                    var response:HttpResponse = event.response;
                    var cookieStr:String = response.header.getValue("Set-Cookie");

      Is there a method I can use here?