# Unloading external swf using depth

**URL:** <https://forum.kirupa.com/t/unloading-external-swf-using-depth/244115>\
**Category:** flash\
**Created:** [November 14, 2007, 12:28pm UTC](https://forum.kirupa.com/t/unloading-external-swf-using-depth/244115 "2007-11-14T12:28:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbalroo](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@bigbalroo](https://forum.kirupa.com/u/bigbalroo)\
**Post date:** [November 14, 2007, 12:28pm UTC](https://forum.kirupa.com/t/unloading-external-swf-using-depth/244115/1 "2007-11-14T12:28:14Z")

</div>

hi all,

i have a main.swf which has the syntax that loads an external swf:

```auto
loadMovieNum("http://www.mainwebsite.com/pop_up.swf", _root.getNextHighestDepth());

```

the main.swf is on one server while the external swf named pop\_up.swf is on another. By using that syntax shown the pop\_up.swf has no problem showing up ontop of the main.swf.  
Problem is now to get the pop\_up.swf to unload using a button placed in pop\_up.swf, i have obviously tried this using levels but it dosent seem to be working.  
So guessing i will have to do it using depths in the same fashion as it was loaded on.

any ideas how to do this?

any help or advice will be much appreciated :}

Bigbalroo
