I'm having this problem when i want to send using socket a message...
textField.addEventListener(KeyboardEvent.KEY_DOWN,enterHandler);
function enterHandler(event:KeyboardEvent):void{
if(event.keyCode == Keyboard.ENTER ){
socket.writeUTF(textField.text);
socket.flush();
trace(textField.text); //the output is what input text is, so the input field is right
}
}
The error is this : Error: Error #2030: End of file was encountered. at flash.utils::ByteArray/readUnsignedByte() at socket_fla::MainTimeline/closeListener()
Any Idea?
Edit: After checking the Java server (RedDwarf) that the client is connected to, it shows that the Message is received, then SEVERE: unknown opcode 0x61 Tried googling it, nothing..