# I'm stuck with an "unLoadMovie" problem

**URL:** <https://forum.kirupa.com/t/im-stuck-with-an-unloadmovie-problem/239289>\
**Category:** Uncategorized\
**Created:** [September 20, 2007, 7:45am UTC](https://forum.kirupa.com/t/im-stuck-with-an-unloadmovie-problem/239289 "2007-09-20T07:45:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HamsterDK](https://avatars.discourse-cdn.com/v4/letter/h/cc9497/32.png) [@HamsterDK](https://forum.kirupa.com/u/HamsterDK)\
**Post date:** [September 20, 2007, 7:45am UTC](https://forum.kirupa.com/t/im-stuck-with-an-unloadmovie-problem/239289/1 "2007-09-20T07:45:36Z")

</div>

Hey Kirupa

First time posting here so be gentle :}

I’m danish so pardon if my english isn’t that good but I’ll try and make myself understandable.

To the problem at hand:

I’m making a website that features a “main.swf” where all the subpages are loaded into via the “LoadMovie” command. It works fine when I put the actionscript on the buttons at the main.swf.

However, in some of the subpages that are loaded in I link to some other pages that need to be loaded into the main.swf while the page that you are at unloads itself.

I’ll try and describe it better: Let’s say I have 3 buttons on the **main.swf** that links and loads in **subp\_1.swf** , **subp\_2.swf** , and **subp\_3.swf**. Now in **subp\_3.swf** there is a button that links to a **gallery.swf** and this needs to be loaded into the main.swf while **subp\_3** unloads itself.

the script on the #3 button on the main.swf looks like this:

```auto
on (release) {
page_container.loadMovie("subp_3.swf");
}

```

and then on the **subp\_3.swf** that loads I have a button that links to \*\*gallery.swf, \*\*and it’s the script on this button that troubles me:

```auto
on (release) {
    unloadMovie(this);
    tellTarget ("_level0") {
    page_container.loadMovie("gallery.swf");
}
}

```

Obviously this doesn’t work (_well the movie unloads itself fine but nothing else happens_) and I’m really not that good at scripting so I hope you can explain the proper code to me.

Thx in advance.
