A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: centering window

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    Tallahassee
    Posts
    35

    centering window

    I have a button with the following code to open a new browser window and center it... but it's not centering.

    on (release) {getURL ("javascript:NewWindow=window.open('http://williamlatimer.com/site4/demo.htm','newWin','width=600,height=400,left=0,to p=0,toolbar=No,location=No,scrollbars=No,status=No ,resizable=No,fullscreen=No'); NewWindow.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(600/2); top_point = parseInt(screen_height/2)-(400/2); setTimeout('NewWindow.moveTo(left_point,top_point) ',100); void(0);");
    }

  2. #2
    Senior Member disorda's Avatar
    Join Date
    Nov 2002
    Location
    Beneath City Level
    Posts
    269
    try knock out the http:// bit and just have the direct window, providing it is in samefolder - something.html
    -or go to flash db and there you will find an ap whichn will do it for you,

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    Tallahassee
    Posts
    35
    Well.. I took out the http://... and just left the file.htm

    it centered it alright, but it made the window sit there and flash/click. Strangest thing!!!

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    Tallahassee
    Posts
    35
    I went ahead and uploaded it anyway and it works online, but not locally???

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