Hello,
i had a problem with encodig utf bytes using jSocket.readUTFBytes().
The error where connected with passing params using ExternalInterface.
So i added one more method to the
jsocket.advanced.as and to the
jsocket.advased.js
jsocket.advanced.as:
public function readEscapedUTFBytes(length:int):String{
return escape(socket.readUTFBytes(length));
}
jsocket.advased.js:
jSocket.prototype.readEscapedUTFBytes = function(length) {
this.assertConnected();
return this.movie.readEscapedUTFBytes(length);
}
So usage in js app:
var data = unescape(Connection.socket.readEscapedUTFBytes(length));
Maybe this will be useful for passing encoded data between the swf and
js :)