I am trying to get a flv video to load on top of a parent swf. (A pop-up within flash). What I chose to do, was to put the flv player in a swf and try to load and unload it with the parent swf. This works great except when the child unloads, the music from the flv keeps playing. I am wondering if I have to do more than just a simple add and remove child.
Here is what I have to load the swf when a button is clicked:
var movieLoader:Loader = new Loader();
playMovie_btn.addEventListener(MouseEvent.CLICK, showMovie);
function showMovie(event:MouseEvent):void
{
movieLoader.load(new URLRequest("memories_vid.swf"));
addChild(movieLoader);
}
movieLoader.x = -150
movieLoader.y = -150
Within “memories_vid.swf” I have a close button…
close_btn.addEventListener(MouseEvent.CLICK, closeWindow);
function closeWindow(event:MouseEvent):void
{
gotoAndPlay(22);
}
Once it plays the outro animation into empty keyframes. Every attempt I have made to removeChild has not work. I still have the audio from the flv playing. How do I get “close_btn” to stop everything and to completely unload the swf? I’m sure there is something simple here that I just do not know. Thanks.