So i have been working on a project, its a digital portfolio. Now I have the Host Movie and and then I have a submovie which is loaded into the Host movie. That all works fine!
Here is my problem… I have embedded a video onto the stage and when I click the exit button to go back to my host the video still plays. Here is my code.
function exit(event:MouseEvent):void {
var parentObj:Object=this.parent.parent;
parentObj.closeMovie();
}
exit_btn.addEventListener(MouseEvent.CLICK, exit);
var movieLoader:Loader = new Loader();
function addMovie(event:Event):void
{
var movieRequest:URLRequest = new URLRequest(“face.swf”);
movieLoader.load(movieRequest);
addChild(movieLoader);
movieLoader.x=30;
}
face_btn.addEventListener(MouseEvent.MOUSE_DOWN,addMovie);
function closeMovie(){
removeChild(movieLoader);
}
function addMovie1(event:Event):void
{
var movieRequest:URLRequest = new URLRequest(“ipod.swf”);
movieLoader.load(movieRequest);
addChild(movieLoader);
movieLoader.x=30;
}
ipod_btn.addEventListener(MouseEvent.MOUSE_DOWN,addMovie1);
function addMovie2(event:Event):void
{
var movieRequest:URLRequest = new URLRequest(“monitor.swf”);
movieLoader.load(movieRequest);
addChild(movieLoader);
movieLoader.x=30;
}
monitor_btn.addEventListener(MouseEvent.MOUSE_DOWN,addMovie2);
function closeMovie1(){
removeChild(movieLoader);
}
I also have 3 other objects in the submovie which loads 3 other sub movies.
Inception!
They work fine, but yet again the video still plays in the background.
Any help would be appreciated.