# Problem with unloadAndStop

**URL:** <https://forum.kirupa.com/t/problem-with-unloadandstop/309476>\
**Category:** Uncategorized\
**Created:** [May 16, 2010, 8:08pm UTC](https://forum.kirupa.com/t/problem-with-unloadandstop/309476 "2010-05-16T20:08:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bltali](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@bltali](https://forum.kirupa.com/u/bltali)\
**Post date:** [May 16, 2010, 8:08pm UTC](https://forum.kirupa.com/t/problem-with-unloadandstop/309476/1 "2010-05-16T20:08:25Z")

</div>

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
