Unloading external swf using depth

hi all,

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

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