# Problem with Unloading swf deleting the container

**URL:** <https://forum.kirupa.com/t/problem-with-unloading-swf-deleting-the-container/285589>\
**Category:** flash\
**Created:** [April 2, 2009, 6:12pm UTC](https://forum.kirupa.com/t/problem-with-unloading-swf-deleting-the-container/285589 "2009-04-02T18:12:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![guitar8101](https://avatars.discourse-cdn.com/v4/letter/g/b38774/32.png) [@guitar8101](https://forum.kirupa.com/u/guitar8101)\
**Post date:** [April 2, 2009, 6:12pm UTC](https://forum.kirupa.com/t/problem-with-unloading-swf-deleting-the-container/285589/1 "2009-04-02T18:12:27Z")

</div>

I have a main swf which I am loading other swf’s in to using a container. On each of the swf’s I am loading I have an unload button which I placed the actionscript below on. The swf unloads fine, but it seems to be unloading the container as well. After I unload one video the others will not load. I don’t know if it is because the unload button is on the swf being loaded and is not on the main swf or what. Is there anything I can put in this to make it unload the external swf and not the container on the main swf? Any help would be greatly appreciated.

```auto

on (press){
   this.onEnterFrame = function(){
      if(this._alpha > 0){
      this._alpha -= 8;
      }
      if (this.alpha > 1) {
            delete this.onEnterFrame;
       }
 
   }
}

```
