Problem with unloadAndStop

hi guys,

I’m pretty new to actionscript but with a few internet tutorials I have managed to use -

var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE,function(e:Event){
addChild(myLoader);

on frame 1 to load a video and then on frame 5,

myLoader.load(new URLRequest(“video/takeNote.swf”));

back.addEventListener(MouseEvent.CLICK, goBack);

function goBack(evtObj:MouseEvent) {
myLoader.unloadAndStop();
gotoAndStop(1);
}

to load an external swf and have the option to close it again. This throws out an error - Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed. - the first time I use the back button but not on subsequent attempts. When I upload this to my webspace, this problem manifests by not unloading the SWF properly and I am unable to play the video more than once.

The strangest thing about this is that the timeline above is in ‘mc_4’ at the bottom of a tree ‘mc_1.mc_2.mc_3.mc_4’ and if I cut ‘mc_4’ and simply paste it into a new flash file making no changes to the code, there is no error and works perfectly when uploaded to the server too.

To make things even more perplexing, if I cut ‘mc_4’ and paste it outside any other movieclips inside the same file, it still throws the error and doesnt work.

By a process of elimination I think I have deduced that the error is something to do with the unloadAndStop action. I changed it to ‘unload’ and the error doesnt appear anymore. Anybody have any idea why it would throw out an error when its inside some other movieclips?

cheers

Andrew