                         // assuming the text is centered within the field
                         var highlight :Bitmap = new Bitmap(_highlightData);
                         addChildAt(_highlights[idx] = highlight, 0);
-                        var bounds :Rectangle = _field.getCharBoundaries(0);
-                        highlight.x = _field.x + bounds.width*xx +
-                            (_field.width - bounds.width*_width)/2;
-                        highlight.y = _field.y + bounds.height*yy +
-                            (_field.height - bounds.height*_height)/2;
+                        var cbounds :Rectangle = _field.getCharBoundaries(0);
+                        highlight.x = _field.x + cbounds.width*xx +
+                            (_field.width - cbounds.width*_width)/2;
+                        highlight.y = _field.y + cbounds.height*yy +
+                            (_field.height - cbounds.height*_height)/2;
                        _field.setTextFormat(_litFormat, tidx, tidx + 1);
                     } else {
                         removeChild(_highlights[idx]);

        _socket = new Socket();
        _socket.addEventListener(Event.CONNECT, function (event :Event) :void {
            // write the magic number, version, screen dimensions
            _socket.writeUnsignedInt(0x57544750);
            _socket.writeUnsignedInt(0x00000001);
            _socket.writeShort(_width);
            _socket.writeShort(_height);
        });
        _socket.addEventListener(IOErrorEvent.IO_ERROR, function (event :IOErrorEvent) :void {
            fatalError("Couldn't connect to server.  Please try again later.");
        });
        _socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
                function (event :SecurityErrorEvent) :void {

            return;
        }
        _socket.writeShort(6);
        _socket.writeShort(event.type == KeyboardEvent.KEY_DOWN ? KEY_PRESSED : KEY_RELEASED);
        _socket.writeUnsignedInt(getQtKeyCode(event));
    }

