# Problem with launching pop-up window under Windows version of IE

**URL:** <https://forum.kirupa.com/t/problem-with-launching-pop-up-window-under-windows-version-of-ie/74954>\
**Category:** flash\
**Created:** [January 4, 2005, 2:47pm UTC](https://forum.kirupa.com/t/problem-with-launching-pop-up-window-under-windows-version-of-ie/74954 "2005-01-04T14:47:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottdking](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@scottdking](https://forum.kirupa.com/u/scottdking)\
**Post date:** [January 4, 2005, 2:47pm UTC](https://forum.kirupa.com/t/problem-with-launching-pop-up-window-under-windows-version-of-ie/74954/1 "2005-01-04T14:47:09Z")

</div>

I wanted to load my main Flash movie in a separate centered window from my initial splash page. I found the Kirupa tutorial, “Launching a Centered Pop-Up Window”

[http://www.kirupa.com/developer/mx/centered\_popup.htm](http://www.kirupa.com/developer/mx/centered_popup.htm)

which seemed perfect for my needs. It worked perfectly in every browser/OS combination but one: IE for Windows (any version). Since this is the browser/OS combination which most users will be using, this is a big problem. Here’s what’s happening. The splash page (splashpage.html) loads fine, but when you click on the button which is supposed to open the new window/movie, the following error is generated:

Line: 1  
Char: 39  
Error: Invalid argument.  
Code: 0  
URL: [http://www.mysite.com/splashpage.html](http://www.mysite.com/splashpage.html)

What am I doing wrong? Thanks in advance for helping a newbie out! Here’s the ActionScript for the button:

on (release) {  
// customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “mysite\_main.html”;  
target\_winName = “Welcome”;  
width = 820;  
height = 620;  
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);  
}

and here’s the ActionScript for the “actions” layer (as described in the Kirupa tutorial):

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