                 if(super.bufferLength ==0) {
                   // reach end of playlist + playback complete (as buffer is empty).
                   // stop timer, report event and switch to IDLE mode.
-                  clearInterval(_interval);
+                  _timer.stop();
                   _hls.dispatchEvent(new HLSEvent(HLSEvent.PLAYBACK_COMPLETE));
                   _setState(HLSStates.IDLE);
                 }

package org.mangui.HLS.streaming {


    import org.mangui.HLS.*;
    import org.mangui.HLS.muxing.*;
    import org.mangui.HLS.streaming.*;

            Log.info("HLSNetStream:close");
            super.close();
            _fragment_loading = false;
            _timer.stop();
            _setState(HLSStates.IDLE);
        };
    }
