Custom Video Controls Question

Hi, I am trying to create a flash video with custom video controls. However the problem that I’m having is that when the movie ends, if you press the “play” button again nothing happens.

What I need to have happen is once the movie has played and the play button is pressed, the movie restarts from the beginning.

Can anyone advise me on how to do this? (I got the original code from gotoandlearn.com)

Here is my code as it stands:

  • var nc:NetConnection = new NetConnection();
    nc.connect(null);

var ns:NetStream = new NetStream(nc);

theVideo.attachVideo(ns);

ns.play (“Spot_4_1.flv”);

rewindButton.onRelease = function () {
ns.seek(0);
}

playButton.onRelease = function () {
ns.pause();
}

var videoInterval = setInterval (videoStatus, 100);
var amountLoaded:Number;

function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 236.7;
}*