Video Player showing incorrect time

Hi,

My video player keeps on showing the incorrect video time of the movie (see image below to what I’m referring to). The seconds are correct, but it keeps rounding the minutes to 1 instead of being 0 minutes. Below is the script. Any help/thoughts is greatly appreciated. Thanks!


onEnterFrame = function () {
// Get video stream bytes loaded
percentage = Math.round(ns.bytesLoaded/ns.bytesTotal);
controls_mc.progress_mc.buffer_mc._xscale = percentage;

// Get video time
ns_seconds = ns.time;
minutes = Math.floor(ns_seconds/60);
seconds = Math.floor(ns_seconds%60);

if (seconds < 10) {
    seconds = "0"+seconds;

}

controls_mc.sound_time_mc.time_txt.text = minutes+":"+seconds+" / "+durationDisplay;

// Progress bar position
if (ns.time>=duration && duration != undefined) {
    controls_mc.progress_mc.played_mc._xscale = 100;
    if (videoEnd == false) {
        controls_mc.bttnPlay.icon_mc.gotoAndStop(2);
        videoEnd = true;
    }  
} else {
    controls_mc.progress_mc.played_mc._xscale = Math.floor(ns.time/duration);
    videoEnd = false;
}

};
stop();