# Centered popup problems

**URL:** <https://forum.kirupa.com/t/centered-popup-problems/188213>\
**Category:** flash\
**Created:** [May 5, 2006, 11:31am UTC](https://forum.kirupa.com/t/centered-popup-problems/188213 "2006-05-05T11:31:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lounge](https://avatars.discourse-cdn.com/v4/letter/l/a5b964/32.png) [@Lounge](https://forum.kirupa.com/u/Lounge)\
**Post date:** [May 5, 2006, 11:31am UTC](https://forum.kirupa.com/t/centered-popup-problems/188213/1 "2006-05-05T11:31:39Z")

</div>

Hey

Im having problems getting the centered popup tutorial to work

I pasted the actions in frame 1 in the top action layer,

[SIZE=1][COLOR=blue]Movieclip.prototype.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);");  
};[/COLOR][/SIZE]

and the other actions on a photo which I have converted to a button, also

[SIZE=1][COLOR=blue]on (release) {  
// customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “[/COLOR][/SIZE][[SIZE=1][COLOR=blue]http://www.kirupa.com/modular/pop-up.htm[/COLOR][/SIZE]](http://www.kirupa.com/modular/pop-up.htm)[SIZE=1][COLOR=blue]”;  
target\_winName = “kirupa”;  
width = 400;  
height = 300;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 1;  
resizable = 0;  
// sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}[/COLOR][/SIZE]

But nothing happens!

Anyone got an idea why it doesnt work?
