# Parental Guidance Needed!

**URL:** https://forum.kirupa.com/t/parental-guidance-needed/269698
**Category:** flash
**Created:** [August 31, 2008, 12:46am UTC](https://forum.kirupa.com/t/parental-guidance-needed/269698 "2008-08-31T00:46:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![slimpickinz](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@slimpickinz](https://forum.kirupa.com/u/slimpickinz)
#### Post date: [August 31, 2008, 12:46am UTC](https://forum.kirupa.com/t/parental-guidance-needed/269698/1 "2008-08-31T00:46:36Z")

</div>

I have a main MC, on which I have a button which dynamically loads another MC on top (like a popup).  
On this popup, I have a close button, which works.  
On the popup, I have another button which dynamically loads another MC on top of popup #1.  
I cannot get the close button on popup #2 to close just that popup, it either does not work at all, or closes both #1 & #2 at the same time.  
I know it has to do with hierarchy, but just cannot grasp this method.  
Attached is the code & files.

```auto
 
// *************
//pop1 MC
//load mcPop2 on top of pop1 and main
var parent:MovieClip = this;
btnPop2.onRelease = function (){
parent.createEmptyMovieClip('holder', parent.getNextHighestDepth());
loadMovie('mcPop2.swf', holder);
holder._x = 50;
holder._y = 100;
}
 
//pop1 close button
//close pop1 only
on(release){
_root.holder.unloadMovie();
}
// *************
//pop2 MC
//close pop2 only... leave pop1 on top of main
on(release){
_root.holder.unloadMovie();
 
}
 
 

```

Files: [http://downeydesign.com/swfs/poptest.zip](http://downeydesign.com/swfs/poptest.zip)
