# Center of the browser

**URL:** <https://forum.kirupa.com/t/center-of-the-browser/124624>\
**Category:** Uncategorized\
**Created:** [October 5, 2004, 12:33pm UTC](https://forum.kirupa.com/t/center-of-the-browser/124624 "2004-10-05T12:33:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flash\_legend](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@flash\_legend](https://forum.kirupa.com/u/flash_legend)\
**Post date:** [October 5, 2004, 12:33pm UTC](https://forum.kirupa.com/t/center-of-the-browser/124624/1 "2004-10-05T12:33:30Z")

</div>

good day

basically a swf file contain a button  
on the first frame i add this code

```auto

_global.openWinLeft = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
    getURL("javascript: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+"))+'"+"');void(0);");
};

```

and on the button i add this code

```auto
on (release) {
    address = "flashindex.swf";
    target_winName = "";
    width = 800;
    height = 600;
    toolbar = 0;
    location = 0;
    directories = 0;
    status = 0;
    menubar = 0;
    scrollbars = 1;
    resizable = 0;
    // sends data back to the function
    openWinLeft(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}

```

ok…  
this problem is when it loads . it will open the browser but not resize automaticall like this site [http://www.estudio.com](http://www.estudio.com)

any help for that
