no. that didnt work i get undefined property error returned.....
stop();
var container:MovieClip = new MovieClip();
var currentPage:String = new String();
var twoDVid:video2DMC;
var threeDVid:video3DMC;
var testVid:testVidMC;
twoDMovies_btn.buttonMode = true;
threeDMovies_btn.buttonMode = true;
testAnimations_btn.buttonMode = true;
twoDMovies_btn.addEventListener(MouseEvent.CLICK, goMovies);
threeDMovies_btn.addEventListener(MouseEvent.CLICK, goMovies);
testAnimations_btn.addEventListener(MouseEvent.CLICK, goMovies);
function removeMovies(e:MouseEvent)
{
switch(e.currentTarget)
{
case twoDMovies_btn:
trace(container.name);
removeModules();
var twoDVid = new video2DMC();
twoDVid.name = "TwoD";
currentPage = twoDVid.name;
addChild(container);
container.addChild (twoDVid);
twoDVid.x = 134.65;
twoDVid.y = 59.6;
//trace(twoDVid.showVideo);
trace ("ok" );
break;
case threeDMovies_btn:
removeModules();
var threeDVid= new video3DMC();
threeDVid.name = "ThreeD";
currentPage = threeDVid.name;
addChild(container);
container.addChild (threeDVid);
threeDVid.x = 134.65;
threeDVid.y = 59.6;
trace("before pause")
twoDVid.pauseVideo();
trace("after pause")
break;
case testAnimations_btn:
removeModules();
var testVid = new testVidMC();
testVid.name = "Test";
currentPage = testVid.name;
addChild(container);
container.addChild (testVid);
testVid.x = 134.65;
testVid.y = 59.6;
//testVid.stopCurrentVideo();
break;
}
// if (container.twoDVid)
// {
// twoDVid.stopCurrentVideo();
// trace("ok")
// }
// else if (threeDVid)
// {
// threeDVid.stopCurrentVideo();
// }
// else (testVid)
// {
// testVid.stopCurrentVideo();
// }
}
function removeModules ()
{
while (container.numChildren)
{
container.removeChildAt (0);
trace(container.numChildren + "this sucks")
//trace(container.numChildren);
}
}
this is my code. i am aware that i'll need to do checks if someone is bouncing back and forth between sections, right now i'm just trying to get the sound to stop once. thank you