         private var _curr_data : Object;
         private var _hola_managed : Boolean = false;
         private var _req_id : String;
-        private var _self_load : Boolean = false;
-        private var _events : Object;
-        private var _size : Number;
 
         public function JSURLStream(){
             _hola_managed = HSettings.enabled && ZExternalInterface.avail();

        }

        private function onopen(e : Event) : void { _connected = true; }

        private function onerror(e : ErrorEvent) : void {
            _delete();
            if (!_events.error)
                return;
            _trigger('onRequestEvent', {req_id: _req_id, event: 'error',
                error: e.text, text: e.toString()});
        }

        private function onprogress(e : ProgressEvent) : void {
            _size = e.bytesTotal;
            if (!_events.progress)
                return;
            _trigger('onRequestEvent', {req_id: _req_id, event: 'progress',
                loaded: e.bytesLoaded, total: e.bytesTotal,
                text: e.toString()});
        }

        private function onstatus(e : HTTPStatusEvent) : void {
            if (!_events.status)
                return;
            // XXX bahaa: get redirected/responseURL/responseHeaders
            _trigger('onRequestEvent', {req_id: _req_id, event: 'status',
                status: e.status, text: e.toString()});
        }

        private function oncomplete(e : Event) : void {
            _delete();
            if (!_events.complete)
                return;
            _trigger('onRequestEvent', {req_id: _req_id, event: 'complete',
                size: _size, text: e.toString()});
        }

        private function decode(str : String) : void {
            if (!str)

    import org.hola.ZExternalInterface;
    import flash.net.URLRequest;
    import flash.net.URLStream;
    import flash.utils.ByteArray;
    import flash.utils.getTimer;
    import flash.utils.Timer;
