# More than one centered pop up window!?

**URL:** <https://forum.kirupa.com/t/more-than-one-centered-pop-up-window/154870>\
**Category:** Uncategorized\
**Created:** [July 13, 2005, 7:56am UTC](https://forum.kirupa.com/t/more-than-one-centered-pop-up-window/154870 "2005-07-13T07:56:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TurboMan](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@TurboMan](https://forum.kirupa.com/u/TurboMan)\
**Post date:** [July 13, 2005, 7:56am UTC](https://forum.kirupa.com/t/more-than-one-centered-pop-up-window/154870/1 "2005-07-13T07:56:24Z")

</div>

Hello ,

It is possible to have in one .swf more than one centered pop up window?

I tried to make two of them , but if I have one already opened the second one will not open!!!

I used this script for the frame :

\_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);”);  
}

and this script for the button that open the centered pop up window :

on (release) {  
//customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “curs valutar.htm”;  
target\_winName = “curs valutar”;  
width = 200;  
height = 200;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
//sends data back to the function  
openWinCentre(address, target\_winName2, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

Thanks for helping me! 🙂
