A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: close browser window from a button?

  1. #1
    mentally unstable member smayer72's Avatar
    Join Date
    Jan 2001
    Posts
    527
    Can anyone tell me how to close the browser window using javascript when the user presses an exit button?

    Thanks
    Scott

  2. #2
    Firmly Fastened to the Milk Sac of Misanthropy
    Join Date
    Aug 2000
    Posts
    463
    I can help you out, but I need a wee bit of info:

    Is the flash movie embedded in an HTML page, or is it a pop-up browser window opened from a parent HTML page (using window.open ('http://yaddayadda.com/movie.swf'...etc)?

    (sorry, that is hard to explain)

    Sem.

  3. #3
    Firmly Fastened to the Milk Sac of Misanthropy
    Join Date
    Aug 2000
    Posts
    463

    html

    Open notepad and type this:

    <HTML>
    <HEAD><TITLE>Window Closer</TITLE></HEAD>
    <BODY ONLOAD="self.close()">
    </BODY>
    </HTML>

    Save the document as closer.html.

    On exit button, give this action:

    On (release) {
    getURL ("closer.html");
    }


    Put the HTML in the same directory as your SWF file and original HTML

    Sem

  4. #4
    mentally unstable member smayer72's Avatar
    Join Date
    Jan 2001
    Posts
    527
    Sem
    Thanks heaps. I didn't think it was quite that simple but it works like a charm.

    Scott

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