       var bT: int = 0;
       var nD: int = 0;
       var nP: int = 0;
+      var bufferLength: int = 0;
       var lP:Number = 0;
       var rP:Number = 0;
       var isBuffering:Object = null;

            }
          } else if (oSound.loaded != true && hasNew) {
            // writeDebug('whileloading() loaded/total/duration: '+bL+', '+bT+', '+nD);
            ExternalInterface.call(sMethod, bL, bT, nD); // _whileloading()
          } else if (!oSound.loaded && bL == 0 && bT && oSound.ns.bufferLength != oSound.lastValues.bufferLength) {
            // TODO: Verify if this merge is correct with above logic.
            // KJV For our RTMP streams bytesLoaded is always 0!
            // writeDebug('updating position with bufferLength ' + oSound.ns.bufferLength);
            oSound.lastValues.bufferLength = oSound.ns.bufferLength;
            ExternalInterface.call(sMethod, bL, bT, nD, oSound.ns.bufferLength);
          }

        } else {

        if (oSound.useNetstream) {

          // video stream
          bufferLength = oSound.ns.bufferLength;
          bL = oSound.ns.bytesLoaded;
          bT = oSound.ns.bytesTotal || oSound.totalBytes;
          nD = int(oSound.duration || 0); // can sometimes be null with short MP3s? Wack.
          nP = oSound.ns.time * 1000;
          //writeDebug('ns: loaded paused time duration bytesloaded bufferLength: '+oSound.loaded+', '+oSound.paused+', '+(oSound.ns.time*1000)+', '+oSound.duration+', '+oSound.ns.bytesLoaded+', '+oSound.ns.bufferLength);
          if (nP != oSound.lastValues.position) {
            oSound.lastValues.position = nP;
            hasNew = true;
