A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flash closing an HTML page

  1. #1
    Junior Member
    Join Date
    Nov 2002
    Location
    SD, CA
    Posts
    25

    Flash closing an HTML page

    Does anybody know how to make a Flash button close the HTML document that contains the SWF. You know, one of those "Close this Window" type of buttons.

    Thanks!

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    code:

    ...



    Won't work without a warning if it's the user's main browser window.
    Last edited by oldnewbie; 12-22-2004 at 10:22 PM.

  3. #3
    Junior Member
    Join Date
    Nov 2002
    Location
    SD, CA
    Posts
    25
    Yeah, I have it as a pop up window. that covers the main HTML page that I have. It covers the whole thing and I have a button to make the pop up HTML page dissapear. Do you know of a way to make that work?

  4. #4
    Uses MX 2004 Pro Quixx's Avatar
    Join Date
    Nov 2004
    Location
    U.S.
    Posts
    877
    This bit of code has worked for me...

    code:

    on (press) {
    getURL("javascript: window.opener=self; window.close();");
    }


    I've never seen a warning pop up while using it (but that's not to say there won't ever be one).

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