      */
     public function closeStreamingConnection():void
     {
+        resetParserState();
+        
     	// First, close the existing connection.
         if (streamingConnection != null)
         {

            result += digit * powerOfSixteen;
        }
        return result;
    }

    /**

    		if (!streamingConnectionCloser.connected)
    		{
    			var request:URLRequest = new URLRequest();
    			var url:String = channel.endpoint;
                if (_appendToURL != null)
                    url += _appendToURL;
    			request.url = url + "?" + COMMAND_PARAM_NAME + "=" + CLOSE_COMMAND + "&"
    			              + STREAM_ID_PARAM_NAME + "=" + streamId + "&" + VERSION_PARAM_NAME + "=" + VERSION_1;
    			request.method = URLRequestMethod.POST;
    			var postParams:URLVariables = new URLVariables();
