         private var _loader:Loader;
         /** Store that a fragment load is in progress. **/
         private var _loading:Boolean;
+        /** means that last fragment of a VOD playlist has been loaded */
+        private var _reached_vod_end:Boolean;
         /** Interval for checking buffer and position. **/
         private var _interval:Number;
         /** Next loading fragment sequence number. **/

            }

            // Load new tags from fragment.
            if(buffer < _loader.getBufferLength() && !_loading) {
               var loadstatus:Number = _loader.loadfragment(_buffer_next_time,_buffer_last_pts,buffer,_loaderCallback,(_buffer.length == 0));
               if (loadstatus == 0) {
                  // good, new fragment being loaded

            }
            // Set playback state and complete.
            if(_stream.bufferLength < 3) {
                if(_reached_vod_end ==true) {
                    if(_stream.bufferLength == 0) {
                        _complete();
                    }
