I have a SWF that loads and plays an FLV. There is additional functionality like pause and mute and some animation that plays when the video is done. It works perfect, but when I load this SWF into a container SWF, most of it stops working and I don't know why. Maybe it's the NetStream code... Any suggestions would be appreciated.

Here is my entire script:

Code:
_root.videoPath = "xxxxxxxxxxxxxx.flv";
_root.playingVar = 1;
_root.panelVar = 0;

function handleFLVevents(infoObject) {
    if (infoObject.code == "NetStream.Play.Stop") {
        stopMovie();
    }
} // If the FLV is over

function stopMovie() {
	_root.playingVar = 0;
	_root.panelVar = 1;
	_root.clipPanel.gotoAndPlay("expand");
	_root.pause_btn.gotoAndStop("off");
	finale.gotoAndStop("off");
	snd.setVolume(100);
	_root.btn.gotoAndStop("on");
} // Do this when the FLV is over

var my_nc = new NetConnection();
my_nc.connect(null);
var my_ns = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.setBufferTime(5);
my_ns.play(_root.videoPath);

pause_btn.onRelease = function () {
	if (_root.panelVar == 1) {
		_root.panelVar = 0;
		_root.clipPanel.gotoAndPlay("contract");
	}
	if (_root.playingVar == 1) {
	    my_ns.pause();
    	pause_btn.play();
	} else {
		_root.playingVar = 1;
		_root.pause_btn.gotoAndStop("on");
	my_ns.play(_root.videoPath);
		finale.gotoAndStop("on");
	}
}; // Pause/Play button actions

var snd = new Sound(this);
snd.attachSound(myVideo);
snd.setVolume(100);

btn.onPress = function () {
    var _loc1 = snd.getVolume();
    snd.setVolume(Math.abs(_loc1 - 100));
    btn.play();
}; // Mute button actions

my_ns.onStatus = function (objStatus) {
    var _loc1 = handleFLVevents(objStatus);
};

function playVideo() {
	my_ns.play(_root.videoPath);
	finale.gotoAndStop("on");
} // Play function for replay buttons

stop();
Thanks, SD909