# Use of unLoadClip

**URL:** <https://forum.kirupa.com/t/use-of-unloadclip/330201>\
**Category:** flash\
**Created:** [December 13, 2012, 2:01pm UTC](https://forum.kirupa.com/t/use-of-unloadclip/330201 "2012-12-13T14:01:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![capdetrons](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@capdetrons](https://forum.kirupa.com/u/capdetrons)\
**Post date:** [December 13, 2012, 2:01pm UTC](https://forum.kirupa.com/t/use-of-unloadclip/330201/1 "2012-12-13T14:01:34Z")

</div>

Hi,

can’t get it to work.

I am loading a clip like so from an attached clip on the main imeline:

```auto
var swfLoader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
var preloder:Object = new Object();
swfLoader.addListener(preloder);
swfLoader.loadClip("scrollPaneLoader.swf", container_mc);
preloder.onLoadComplete = function():Void {
container_mc._x = 0;
container_mc._y = 0;
}

```

I’ve attached a button which I’m trying to control from the same timeline, but I keep getting errors like: there’s no such method as unLoadClip…

I was trying this:

```auto
var swfLoader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
var preloder:Object = new Object();
swfLoader.addListener(preloder);
swfLoader.loadClip("scrollPaneLoader.swf", container_mc);
preloder.onLoadComplete = function():Void {
 returnButton_mc.onRelease = function():Void {
 swfLoader.unLoadClip(container_mc);
 //_root.gotoAndStop(1); I want to unload the swf to have the main swf's timeline tart over
}
}

```

I can’t find any examples to apply to my file. I guess I am not undestanding the use of the unLoadClip method nor whether I need a listener…

thanks in advance to anyone who can enlighten me on how to solve this
