I have a website that plays video1 when it opens. When you navigate to next page the video stops. One of the buttons on the second page plays video2. The problem is that video 2 won't stop using the same command that made video1 stop.

Thanks to anyone who can help me out.
D

here is the code for the home page:
var vid:Video = new Video();
var nc:NetConnection = new NetConnection();
nc.connect(null);
var netStream:NetStream = new NetStream(nc);

netStream.close();
vid.visible=false;

netStream.addEventListener(NetStatusEvent.NET_STAT US, ns_onPlayStatus);
addChild(vid);
vid.attachNetStream(netStream);
netStream.bufferTime=3;

netStream.play("video1.flv");
vid.visible=true;
vid.width=665;
vid.height=500;
vid.x=40;
vid.y=180;

here is the code for page 2:

netStream.close();
vid.visible=false;

bInside.addEventListener(MouseEvent.CLICK, video2);
function video2(event:MouseEvent):void {
mcRates.stop();
mcActivities.stop();
mcMap.stop();

mcRates.visible=false;
mcActivities.visible=false;
mcMap.visible=false;

nc.connect(null);
netStream.play("video2.flv");
vid.visible=true;
vid.width=480;
vid.height=360;
vid.x=250;
vid.y=240;
}

bRates.addEventListener(MouseEvent.CLICK, rates);
function rates(event:MouseEvent):void {
mcRates.play();

mcActivities.stop();
mcMap.stop();

netStream.close();
vid.visible=false;

mcRates.visible=true;
mcActivities.visible=false;
mcMap.visible=false;

}