This content has been marked as final. Show 4 replies
What is the error, and can you provide simplified sample code.
I tried many things:
var rawData:String = String(resultEvent.result);
var byte:ByteArray=new ByteArray();
byte.writeUTFBytes(rawData); // I also tried byte.writeUTF(rawData);
Besides, document says the result formats maybe:
"object" The value returned is XML and is parsed as a tree of ActionScript objects. This is the default.
"array" The value returned is XML and is parsed as a tree of ActionScript objects however if the top level object is not an Array, a new Array is created and the result set as the first item. If makeObjectsBindable is true then the Array will be wrapped in an ArrayCollection.
"xml" The value returned is XML and is returned as literal XML in an ActionScript XMLnode object.
"flashvars" The value returned is text containing name=value pairs separated by ampersands, which is parsed into an ActionScript object.
"text" The value returned is text, and is left raw.
"e4x" The value returned is XML and is returned as literal XML in an ActionScript XML object, which can be accessed using ECMAScript for XML (E4X) expressions.
None of them is what I want, right? The only thing close is text.
I tried base64, that works, which prove the uncompress part work. I just don't know how to get a ByteArray from a jsp page. I can only read text. :-(
Maybe you can't use HTTPService. How about Socket, or URLStream.
See these help topics:
Converting data from Java to ActionScript
Thanks. I will take a look for that.