Flash streaming video problem

Hey Everyone

I found this cool tutorial to stream video in flash at gotoAndlearn.com

I’ve run into a problem though and no one on the GotoAndLearn forum can help me out.

Maybe someone can help me here

I created the tutorial for a video player which I found on gotoAndLearn.com . It works completely fine when I test it offline, it buffers and the video loader bar works.

As soon as I upload and test online it screws out, the bufferClip stays open and the progress bar just jumps to 100%

//Net Connection object
var nc:NetConnection = new NetConnection();

//Net Stream object
var ns:NetStream = new NetStream(nc);

//buffer code
ns.onStatus = function(info) {
    if (info.code=="NetStream.Buffer.Full") {
        bufferClip._visible = false;
    if (info.code=="NetStream.Buffer.Empty") {
        bufferClip._visible = true;
    if (info.code=="NetStream.Play.Stop") {
//Attach NetStream to the video

//Play this video

//Button actionscript
playButton.onRelease = function() {
rewindButton.onRelease = function() {
//Video interval function

var videoInterval = setInterval(videoStatus, 10);

//Amount loaded Variable
var amountLoaded:Number;

//Loader width
var loadBarwidth:Number = 363;

// duration variable

var duration:Number;

//on Metadata function
ns.onMetaData = function(obj) {
    duration = obj.duration;
// VideoStatus function code
function videoStatus() {
    amountLoaded = ns.bytesLoaded/ns.bytesTotal;
    loader.loadbar._width = amountLoaded*loadBarwidth;
    loader.scrub._x = ns.time/duration*loadBarwidth;
//scrub Variable
var scrubInterval;

//scrub bar code
loader.scrub.onPress = function() {
    scrubInterval = setInterval(scrubit, 100);
    this.startDrag(false, -1, this._y, 359, this._y);

//scrub event handler
loader.scrub.onRelease = loader.scrub.onReleaseOutside=function () {
    videoInterval = setInterval(videoStatus, 100);

//scrubit function
function scrubit() {

This bit of code I changed according to a thread on gotoAndLearn. In order for this to work the way I have it below I had to add a line of code in the NetStream.as file

var duration:Number;

//on Metadata function
ns.onMetaData = function(obj) {
    duration = obj.duration;

Before the above code read like this

var duration:Number; 
ns["onMetaData"] = function (obj) { 
   duration = obj.duration; 

Here is the url to the onlie player