# Script Question

**URL:** <https://forum.kirupa.com/t/script-question/85929>\
**Category:** flash\
**Created:** [April 8, 2005, 1:41pm UTC](https://forum.kirupa.com/t/script-question/85929 "2005-04-08T13:41:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![derm](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@derm](https://forum.kirupa.com/u/derm)\
**Post date:** [April 8, 2005, 1:41pm UTC](https://forum.kirupa.com/t/script-question/85929/1 "2005-04-08T13:41:39Z")

</div>

Hello everyone,

Right now I’m using a script on my index page to open up a pop-up.  
It works great, but I was wondering how to make the pop up centered in the screen when it launches. Right now it pops up at the left side of my screen.

Heres the script:

on (release) {  
getURL(“javascript:NewWindow=window.open(‘[http://www.olddirtydermot.com/popup.html’,‘olddirtydermot’,‘width=1130,height=1300,top=0,left=0,toolbar=no,scrollbars=yes,resizable=no,menubar=no,status=no,directories=no,location=no’);NewWindow.focus();screen\_height=window.screen.availHeight;screen\_width=window.screen.availWidth;left\_point=parseInt(screen\_width/2)-(950/2);top\_point=parseInt(screen\_height/2)-(514/2);setTimeout('NewWindow.moveTo(left\_point,top\_point)](http://www.olddirtydermot.com/popup.html','olddirtydermot','width=1130,height=1300,top=0,left=0,toolbar=no,scrollbars=yes,resizable=no,menubar=no,status=no,directories=no,location=no');NewWindow.focus();screen_height=window.screen.availHeight;screen_width=window.screen.availWidth;left_point=parseInt(screen_width/2)-(950/2);top_point=parseInt(screen_height/2)-(514/2);setTimeout('NewWindow.moveTo(left_point,top_point))’,100);void(0);”);  
}

Thanks for your time and help.
