some comments added to make it easier for you to spot the differences :-)
private function handleTcpData(event:Event):void { if(_socket.bytesAvailable) { // USE IF, NOT WHILE! try{ // CATCH THE EXCEPTION var str:String = _socket.readUTF(); updateGUI(str); }catch(e:Error){} } } _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders