A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Browser Power

  1. #1
    Junior Member
    Join Date
    Mar 2001

    Most sites have a splash page and then the main movie pops up in another widow so that the desired size/look can be achieved.

    Is it possible to control the size/look of a user's browser window on first arriving at your site so that another window is not required?

    Thanks for any advice

  2. #2
    cheese me. TrIzKuT's Avatar
    Join Date
    May 2001
    yea, it requires a bit of JS (javascript), but I'm no good at it

  3. #3
    Junior Member
    Join Date
    Apr 2001

    The Solution

    Copy [ctrl C]Paste [ctrlV] this code in between the <HEAD> tags of your html document....

    <SCRIPT LANGUAGE="JavaScript">

    var windowX = Math.ceil( (window.screen.width - 600) / 2 );
    var windowY = Math.ceil( (window.screen.height - 400) / 2 );
    window.moveTo( Math.ceil( windowX ) , Math.ceil( windowY ) );

    It makes your window Width 600 and the hight 400 pixels
    and then places it in the middle of the screen...chane the numbers to your desired size..

    PS be aware that this works perfect in IE, but Netscape, [because of a whole lot of bugs] tends to mangle the code in their different versions.

    Greetz Vormkrijger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center