I can't get removeChild to work


Here is the background Website has 3 pages.
Page 1 has a video that is called up dynamically.
The code that calls this video is on the last frame of a movieclip.
( Scene 1 - Symbol 17.mc has the code inside it)

Here is my coding to call up the .flv


var myVideo:NetConnection = new NetConnection();
myVideo.connect(null);
var newStream:NetStream = new NetStream(myVideo);

var videoHolder:Video = new Video(650, 490);
stage.addChild(videoHolder);
videoHolder.x=580
videoHolder.y=500
videoHolder.attachNetStream(newStream);

newStream.play(“mainpagevid.flv”);

newStream.addEventListener(AsyncErrorEvent.ASYNC_E RROR, errorhandler)
function errorhandler(myevent:AsyncErrorEvent){//ignore error
}

pause_btn.addEventListener(MouseEvent.CLICK, pausefunction)
function pausefunction (myevent:MouseEvent):void{
newStream.pause()
}

resume_btn.addEventListener(MouseEvent.CLICK, resumefunction)
function resumefunction (myevent:MouseEvent):void{
newStream.resume()
}*****

I have been unsuccesful with either of the options below. Please help with coding.

  1. I am trying to add code to the menu buttons, so that when I CLICK to goto the next page, the video is removed.

  2. I am trying to add code on the action panels for the frames that the other web pages are on so that when the viewer gets to those pages the video is removed upon arrival.