SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru JoePrice's Avatar
    Join Date
    Jan 2002
    Location
    UK
    Posts
    673
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Centreing a popup window on the screen from flash

    Hi Chappies

    I'm generating a popup window from flash using the code below:
    Code:
    getURL ("javascript:window.open('duh.html','newWin','width=600,height=500,left=100,top=100, toolbar=No,location=No,scrollbars=Yes,status=No,resizable=No,fullscreen=No');void(0);");
    Now I want to be able to centre this window to the middle of the screen. I can do this easily enough If i was to write a javascript function say for an html page, however you can't write javascript functions in flash, just command lines like the one above. So how can I centre this window?
    i've tried:
    Code:
    left=((screen.width - 600)/2), top=((screen.height - 500)/2)
    but thats doesnt appear to work.

    any ideas ?

    Many thanks

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check the function 'waitWin_open()' here.
    ::: certified wild guess :::

  3. #3
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Write the function in JavaScript & call it through Flash.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  4. #4
    SitePoint Guru JoePrice's Avatar
    Join Date
    Jan 2002
    Location
    UK
    Posts
    673
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers for the responses

  5. #5
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    mimbelus dinky pums
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!


Bookmarks

Posting Permissions

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