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

        private var _loader:Loader;
        /** Store that a fragment load is in progress. **/
        private var _loading:Boolean;
        /** Interval for checking buffer and position. **/
        private var _interval:Number;
        /** Next loading fragment sequence number. **/


        /** Check the bufferlength. **/
        private function _checkBuffer():void {
            var buffer:Number = 0;
            // Calculate the buffer and position.
            if(_buffer.length) {
