# Centerd PopUp-Help-Minor Change AS2

**URL:** <https://forum.kirupa.com/t/centerd-popup-help-minor-change-as2/231776>\
**Category:** flash\
**Created:** [July 7, 2007, 10:11pm UTC](https://forum.kirupa.com/t/centerd-popup-help-minor-change-as2/231776 "2007-07-07T22:11:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrizzle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chrizzle](https://forum.kirupa.com/u/chrizzle)\
**Post date:** [July 7, 2007, 10:11pm UTC](https://forum.kirupa.com/t/centerd-popup-help-minor-change-as2/231776/1 "2007-07-07T22:11:04Z")

</div>

Hi folks  
This tutorial [http://www.kirupa.com/developer/mx/centered\_popup.htm](http://www.kirupa.com/developer/mx/centered_popup.htm) works just fine. But, I am using this on a button inside of moiveclip1, which lives in movieclip2, which lives in movieclip3, which is on the main timeline. So when I launch my main movie, the button does not launch the pop up. I am assuming it has something to do with the reference to “\_root” in this code:

```auto
_root.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",top='+((screen.height/2)-(" + h/2 + "))+',left='+((screen.width/2)-(" + w/2 + "))+'" + "')}else{myWin.focus();};void(0);");
}

```

When this button is placed in the root timeline is functions fine, but not at all when used inside my movieclip1, which lives in movieclip2 which lives in movieclip3 on the main timeline. Any Ideas ?

Thank you in advance !!
