# Probably a simple question

**URL:** <https://forum.kirupa.com/t/probably-a-simple-question/310391>\
**Category:** Uncategorized\
**Created:** [June 9, 2010, 6:09am UTC](https://forum.kirupa.com/t/probably-a-simple-question/310391 "2010-06-09T06:09:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![catholic](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@catholic](https://forum.kirupa.com/u/catholic)\
**Post date:** [June 9, 2010, 6:09am UTC](https://forum.kirupa.com/t/probably-a-simple-question/310391/1 "2010-06-09T06:09:34Z")

</div>

I am fairly new with action script and I am trying to build an interactive map where the user clicks on a country and then the country pops up along with information about the country. I have that part working fine, but when the country does pop up it is still behind the map, even though it is above it on my layers. I was told that the best way to fix this would be by using setChildIndex, but I am not really sure what that means. I tried searching and got a bit of code which I added to my action script layer, but what else do I need to do? Do I have to to anything special to the actual layer with the movie clip that is activated on click? I am not getting any errors but the movie clip still is behind everything. Any help would be GREATLY appreciated. Thanks!

This is the code I have right now:

stop();  
import flash.events.MouseEvent;

//—Italy pop up on CLICK—\  
italy\_btn.addEventListener(MouseEvent.CLICK, iClick);

function iClick(event:MouseEvent):void {  
gotoAndStop(“italy”);  
event.target.parent.setChildIndex(event.target,1);

//—Back Button—\  
addEventListener(Event.ENTER\_FRAME,chkAvailable);  
}

function chkAvailable(e:Event):void {  
if (back\_btn) {  
back\_btn.addEventListener(MouseEvent.CLICK, rClick);  
removeEventListener(Event.ENTER\_FRAME,chkAvailable);  
}  
}

function rClick(event:MouseEvent):void {  
gotoAndStop(1);  
event.currentTarget.removeEventListener(MouseEvent.CLICK, rClick);  
}
