13 Replies Latest reply on Jun 4, 2009 6:49 AM by kglad

    centering a pop-up browser window

    nshull Level 1

      Does anyone know how to horizontally and vertically center a browser pop-up window in Flash?

      Below is the code tied to my Flash button:


      on (release) {
          getURL("javascript:openNewWindow('http://www.blahblahblah.com','thewin','height=300,width=400,toolbar=no,location=no,menubar =no,status=no,scrollbars=yes') ");


      And here's the code on my HTML page:


      <SCRIPT LANGUAGE=JavaScript>
      function openNewWindow(URLtoOpen, windowName, windowFeatures) {
        newWindow=window.open(URLtoOpen, windowName, windowFeatures);




      <A HREF=javascript:openNewWindow('http://www.blahblahblah.com','thewin','height=300,width=400,toolbar=no,location=no,menubar =no,status=no,scrollbars=yes') ></A>


      Any suggestions would very very helpful!


      Thank you,